Re: Redis usage question
Turns out the issue with calling the config was I was missing an underscore in the construct function in my library file. As far as the Redis goes, I've read, that it does not need to make a new connection with every page load by using something called "connection pooling" or "singlet...
Jump to post- Tue Aug 13, 2024 7:07 am
- Replies 7
- Views 602
Re: Redis usage question
OK, thanks for the pointer, but I need a little help here. Two issues. What you pointed me to seems to solve two issues I have. One having a function work on multiple controllers and this. I couldn't quite wrap my head around how it fixed this issue, so I dove into applying it to my other issue and ...
Jump to post- Tue Aug 13, 2024 4:20 am
- Replies 7
- Views 602
Re: Redis usage question
I wasn't thinking. I could put the connect code in the catalog/startup controller (I believe). But then how do I access/handle the $redis-> function calls on other controller pages?
Jump to post- Mon Aug 12, 2024 3:06 am
- Replies 7
- Views 602
Redis usage question
I'm using redis for an extension I'm making. I'm not sure I'm using it in the best way with what I'm doing. I'm calling the connection to redis once with every page load in the footer. $redis = new Redis(); $redis->connect('127.0.0.1', 6379); Then subsequent function calls look like the following fo...
Jump to post- Sat Aug 10, 2024 10:25 am
- Replies 7
- Views 602
Re: Odd javascript behavior help
Looks like the issue is with bootstrap. Here are two fixes.
Code: Select all
let button = document.getElementById('buttondeleteall');
$(button).attr('title', value).tooltip('fixTitle');
Code: Select all
let button = document.getElementById('buttondeleteall');
$(button).attr('data-original-title', value)
- Fri Aug 02, 2024 1:04 pm
- Replies 11
- Views 780
Re: Odd javascript behavior help
I actually tried that already. I noticed that attribute when I entered the information directly in the console. It didn't work.
Jump to post- Fri Aug 02, 2024 4:14 am
- Replies 11
- Views 780
Re: Odd javascript behavior help
Right after typing the correction in and pressing ENTER under it pops up "undefined" and the actual button is not updated, but the info in the console shows the title changed.
Jump to post- Fri Aug 02, 2024 2:25 am
- Replies 11
- Views 780
Re: Odd javascript behavior help
Yes it shows it is changing in the console as soon as I click the tab.
I've never entered code directly in the console before, so I don't know if I entered it in the correct place, but here's a screenshot of where I did it and the result.
- Fri Aug 02, 2024 12:29 am
- Replies 11
- Views 780
Re: Odd javascript behavior help
<li class="active"><a href="#tab-ratelimit" data-toggle="tab" onclick="setCookie('tab', 'ratelimit')">{{ tab_1 }}</a></li> Yes it's being called, already verified in the developer console...and also stated in OP, once the page is refreshed the change shows up.
Jump to post- Thu Aug 01, 2024 10:18 pm
- Replies 11
- Views 780
[SOLVED] Odd javascript behavior with title attribute help
I have a small javascript function that doesn't seem to be behaving normally. It is supposed to update the title of a button in the admin. The problem is it doesn't update the displayed title (when hovering) until the page is refreshed. I have sass and theme cache turned off. Other javascript stuff ...
Jump to post- Thu Aug 01, 2024 5:20 am
- Replies 11
- Views 780
Re: Code help with mysql deleted row count
That's it, thanks.
Jump to post- Wed Jul 31, 2024 5:59 pm
- Replies 4
- Views 1001
Re: Code help with mysql deleted row count
I did, but I didn't get a result. I may not have implemented it correctly, but I don't know. I tried each of the following (and other variations): $test1 = $this->db->query("DELETE FROM ____")' $test2 = $this->db->query("SELECT ROW_COUNT(".$test1.")"); $test1 = $this->d...
Jump to post- Sun Jul 28, 2024 2:36 am
- Replies 4
- Views 1001
[SOLVED] Code help with mysql deleted row count
Trying to find the amount of rows deleted in a mysql query '$this->db->query("DELETE FROM ____")'. Google search is only turning up results for pdo and mysqli. And num_rows doesn't work on php 8. Any help please.
Jump to post- Sat Jul 27, 2024 5:52 am
- Replies 4
- Views 1001
Calling config information
When I use "$this->config->get()", is that doing a database query every time, or is that calling an array of info or something?
Jump to post- Thu Jul 25, 2024 9:21 pm
- Replies 3
- Views 701
Re: database update problem
Ahhh I see, thanks both of you.
Jump to post- Thu Jul 25, 2024 5:23 am
- Replies 6
- Views 545
Re: database update problem
@grgr, mine already does match..."site_guard".
Jump to post- Wed Jul 24, 2024 10:15 pm
- Replies 6
- Views 545
Re: database update problem
I edited the OP while you were posting. Jump to post
- Wed Jul 24, 2024 9:45 pm
- Replies 6
- Views 545
[SOLVED] database update problem
I'm doing my first mod with an admin page and using the settings table in the database. I want to change the code name for my settings, but once I change it the settings are no longer saving until I change it back. Ex. I have it working like: if (($this->request->server['REQUEST_METHOD'] == 'POST') ...
Jump to post- Wed Jul 24, 2024 9:21 pm
- Replies 6
- Views 545
Re: custom http error pages
They look like the standard server error pages. I'm 99% sure the issue is on their side, because some other basic code I tried putting in the server config was not working either. I was just hoping OC was somehow interfering with this and it was a simple fix.
Jump to post- Fri Jul 19, 2024 7:41 pm
- Replies 3
- Views 752