I've got everything installed and added the patches to set the default list size instead of all. Everything is working great, but my database table is pretty big and exceeds the memory allotted when it displays all...it's almost 15,000 rows right now and growing. I plan on adding other search functions later, I just have to learn an little (or a lot) more php.
Is it possible to remove the "All" option in the pagination dropdown so users don't run into this problem?
If the exceeding memory thing sounds weird, the error that shows up leads to a line in rokbox code in the system directory. I can't figure that one out, but there really isn't any reason for people to view 15,000 records on one page, so I figured this was the best solution.
Is it possible to remove the "All" option in the pagination dropdown so users don't run into this problem?
If the exceeding memory thing sounds weird, the error that shows up leads to a line in rokbox code in the system directory. I can't figure that one out, but there really isn't any reason for people to view 15,000 records on one page, so I figured this was the best solution.
Hi ben,
please look at this thread, it may be what you need:
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=12&t=11970&start=0&st=0&sk=t&sd=a
Regards
Max
please look at this thread, it may be what you need:
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=12&t=11970&start=0&st=0&sk=t&sd=a
Regards
Max
I've already done that part and everything is working fine there. The problem is when you use the dropdown and choose "All", they you get this error:
Here's the link:
http://starcrestawards.com/awards/databases/scr
If you choose "All" and get that error, just clear your browsers cache and cookies to revisit it and see it at the default of 25 again.
Fatal error: Out of memory (allocated 35389440) (tried to allocate 7497389 bytes) in /home/starcres/public_html/plugins/system/rokbox.php on line 81
Here's the link:
http://starcrestawards.com/awards/databases/scr
If you choose "All" and get that error, just clear your browsers cache and cookies to revisit it and see it at the default of 25 again.
Hi benblee,
I tooka look at the code and this is hard-coded deep in the core code (line 329 of libraries/joomla/html/pagination.php). While you could hack that I think that maybe a better solution is to add some JavaScript to your page either to remove that option from your list (the option has a value of '0') or replace it with some smaller default - maybe '200'.
Bob
I tooka look at the code and this is hard-coded deep in the core code (line 329 of libraries/joomla/html/pagination.php). While you could hack that I think that maybe a better solution is to add some JavaScript to your page either to remove that option from your list (the option has a value of '0') or replace it with some smaller default - maybe '200'.
Bob
Thanks for the reply. No wonder I couldn't find it.
I'm definitely not an expert at java, is there code that you could suggest or would this require a good bit of work?
I'm not sure how to override something that is being called in from another file.
Once I get this up and running, I am planning on writing up a little tutorial of how I made my form and linked everything together...including how to set up a page for admins to go with backup links for the db tables. It's really just going to be a compilation of a lot of stuff you guys have here, just a "front to back" sort of layout for it.
Thanks again for the great component! It does take learning some code, but what you can do with it is so far beyond anything else out there, it's amazing. Very good marks on the engineering side of things here.
I'm definitely not an expert at java, is there code that you could suggest or would this require a good bit of work?
I'm not sure how to override something that is being called in from another file.
Once I get this up and running, I am planning on writing up a little tutorial of how I made my form and linked everything together...including how to set up a page for admins to go with backup links for the db tables. It's really just going to be a compilation of a lot of stuff you guys have here, just a "front to back" sort of layout for it.
Thanks again for the great component! It does take learning some code, but what you can do with it is so far beyond anything else out there, it's amazing. Very good marks on the engineering side of things here.
Hi Ben,
Here's a JavaScript snippet that seems to do the trick
Insert this code somewhere on the page.
Bob
Here's a JavaScript snippet that seems to do the trick
<script type="text/javascript">
window.addEvent('domready', function() {
var limit_select = $('limit').options;
if ( !limit_select ) return;
for ( var i = 0; i < limit_select.length; i++ ) {
if ( limit_select[i].value == 0 ) {
limit_select[i].value = 200;
limit_select[i].innerHTML = '200';
}
}
});
</script>
It looks for the value='0' option and resets it to 200, you can change the value in the two lines if you like.Insert this code somewhere on the page.
Bob
hello !
I just want to know how you write that kind of pagination in joomla ?
I just want to know how you write that kind of pagination in joomla ?
I think it's just taking advantage of the built in pagination function that Joomla already has. You could search the core Joomla files for their code.
thanks for your reply. i mean i already write to list item and i want to add pagination in list. can u suggest me please ?
This is the first starting point that made me want to type up a tutorial. Give it a try and let me know if it's what you were looking for.
http://www.chronoengine.com/forums.html?cont=posts&f=5&t=12324#p21887
http://www.chronoengine.com/forums.html?cont=posts&f=5&t=12324#p21887
This topic is locked and no more replies can be posted.