• Board index ‹ Special Interest Forum ‹ phpBB3 Mods
  • Change font size
  • FAQ • Search • Register • Login

It is currently Thu Nov 20, 2008 9:16 am

Simple phpBB3 Smiley Pagination Mod V1

Place to discuss phpbb3 modifications. Help, tips, ideas, suggestions...with no guarantees!!!!
Post a reply
38 posts • Page 1 of 2 • 1, 2

Simple phpBB3 Smiley Pagination Mod V1

Postby Vladd44 on Fri Jun 27, 2008 6:36 am

There didn't seem to be one around for phpbb3, and clearly the forum needed pagination for smilies again.

So Here it is. I saw a few people posting in places looking for one, hopefully they will find it.

Pagination script link

This thread will ultimately be added to the end of the thread to allow continuity of discussion.

Also included is a zipped version.

I have kept it very basic, but I am sure it will change over time.
Jewish Kid: Is anyone else having problems concentrating on this? I just can't seem to concentrate.
Cartman: Maybe we should send you to a concentration camp.
User avatar
Vladd44
Site Admin
 
Posts: 4441
Joined: Wed Dec 31, 1969 7:00 pm
Location: New Orleans Crypt 69
  • Website
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Stoker on Thu Aug 14, 2008 7:10 am

I installed this Mod and changed the smilie count to 50.
Uploaded and refreshed.

Got this error:
Code: Select all
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 120: mysql_query() [function.mysql-query]: Access denied for user 'www-data'@'localhost' (using password: NO)
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 120: mysql_query() [function.mysql-query]: A link to the server could not be established
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 121: mysql_num_rows(): supplied argument is not a valid MySQL result resource
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 130: Undefined variable: pagination

And there is no pagination.

I use 3.0.2

Can this be fixed?
Stoker
 
Posts: 5
Joined: Thu Aug 14, 2008 6:53 am
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Vladd44 on Thu Aug 14, 2008 7:35 am

Can you post your functions_posting.php ?

I will see what I can do.

I will also upgrade to 3.02 to see if the problem could be related to it somehow, I have been slacking and have still be running 3.01 .
Jewish Kid: Is anyone else having problems concentrating on this? I just can't seem to concentrate.
Cartman: Maybe we should send you to a concentration camp.
User avatar
Vladd44
Site Admin
 
Posts: 4441
Joined: Wed Dec 31, 1969 7:00 pm
Location: New Orleans Crypt 69
  • Website
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Stoker on Thu Aug 14, 2008 7:53 am

Yes, here You go:
posting.zip
functions_posting.php
(17.93 KiB) Downloaded 10 times
Stoker
 
Posts: 5
Joined: Thu Aug 14, 2008 6:53 am
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Vladd44 on Thu Aug 14, 2008 11:41 am

I updated it, it should work fine now.

Sorry about the issues, let me know if there are any additional problems. And if possible, please let me know that it worked as well. :D

I noticed another issues that could crop up if someone was not using the default prefix, so I corrected that as well, even though I doubt that was your problem.

What was changed was the following.....

Code: Select all
#
#-----[ FIND ]---------------------------------------------------
#
      page_footer();
#
#-----[ Before, ADD ]-------------------------------------------
#
// additions to pagination
if ($start){
$cp = $start / $smiley_limit;
} else {
$cp = 1;
}
$pagination = '';
$ref = $db->sql_query('SELECT * FROM '. SMILIES_TABLE );
$n_smiles = $db->sql_affectedrows('SELECT * FROM '. SMILIES_TABLE );
$total_pages =ceil($n_smiles/$smiley_limit);
for ($apl=1; $apl<=$total_pages; $apl++) {
$pagination.= '<a href="../posting.php?mode=smilies&start='.(($apl-1)*$smiley_limit).'"> '.$apl.' </a>';
}
$pagination = "<br><center>Now Showing Page $cp of $total_pages. <br>Total Pages $pagination </center>";
$template->assign_vars(array(
'PAGINATION' => $pagination ));
// end additon to pagination
Jewish Kid: Is anyone else having problems concentrating on this? I just can't seem to concentrate.
Cartman: Maybe we should send you to a concentration camp.
User avatar
Vladd44
Site Admin
 
Posts: 4441
Joined: Wed Dec 31, 1969 7:00 pm
Location: New Orleans Crypt 69
  • Website
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Stoker on Thu Aug 14, 2008 12:39 pm

Thanks for updating.
No debug errors but i cant go to any other smilie page than page 1.
Stoker
 
Posts: 5
Joined: Thu Aug 14, 2008 6:53 am
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Vladd44 on Thu Aug 14, 2008 1:43 pm

Does it show the page numbers but not as links?

Or does it not show the page numbers?

If you don't mind pm me or post a link to your forum. Whichever you prefer, so I can see what you are seeing.

Or at least a screen cap.
Jewish Kid: Is anyone else having problems concentrating on this? I just can't seem to concentrate.
Cartman: Maybe we should send you to a concentration camp.
User avatar
Vladd44
Site Admin
 
Posts: 4441
Joined: Wed Dec 31, 1969 7:00 pm
Location: New Orleans Crypt 69
  • Website
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Stoker on Thu Aug 14, 2008 1:47 pm

Everything is in the right place.
It shows page numbers as links, but when I click (2 or 3) the page dont change as it should.
Stoker
 
Posts: 5
Joined: Thu Aug 14, 2008 6:53 am
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Vladd44 on Thu Aug 14, 2008 4:23 pm

Please reinstall the mod.
I made several additional changes, this should correct your problem.

Once again, thanks for your input, and your patience.
Jewish Kid: Is anyone else having problems concentrating on this? I just can't seem to concentrate.
Cartman: Maybe we should send you to a concentration camp.
User avatar
Vladd44
Site Admin
 
Posts: 4441
Joined: Wed Dec 31, 1969 7:00 pm
Location: New Orleans Crypt 69
  • Website
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Stoker on Fri Aug 15, 2008 7:47 am

Thanks, now it is working perfect :mrgreen:
Stoker
 
Posts: 5
Joined: Thu Aug 14, 2008 6:53 am
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Vladd44 on Fri Aug 15, 2008 7:49 am

Glad to be of assistance.

:drink :wink: :drink
Jewish Kid: Is anyone else having problems concentrating on this? I just can't seem to concentrate.
Cartman: Maybe we should send you to a concentration camp.
User avatar
Vladd44
Site Admin
 
Posts: 4441
Joined: Wed Dec 31, 1969 7:00 pm
Location: New Orleans Crypt 69
  • Website
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Sunka on Wed Aug 27, 2008 7:24 pm

Hi...look very nice MOD...But only subsilver instructions are given...what about Prosilver?
Sunka
 
Posts: 1
Joined: Wed Aug 27, 2008 7:23 pm
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Vladd44 on Thu Aug 28, 2008 7:20 am

Code: Select all
Find
<!-- BEGIN smiley -->

Before Add

<span class="genmed">{PAGINATION}</span>
Jewish Kid: Is anyone else having problems concentrating on this? I just can't seem to concentrate.
Cartman: Maybe we should send you to a concentration camp.
User avatar
Vladd44
Site Admin
 
Posts: 4441
Joined: Wed Dec 31, 1969 7:00 pm
Location: New Orleans Crypt 69
  • Website
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Sky on Tue Sep 23, 2008 1:40 pm

Great, much needed mod - thanks.

I've installed it, and it's working but for the fact that I'm only getting the first page of smileys, and no page numbers, so no way of getting to the rest of the smileys. :(

[Edited to add that I'm using prosilver]
User avatar
Sky
 
Posts: 10
Joined: Tue Sep 23, 2008 1:38 pm
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Vladd44 on Wed Sep 24, 2008 6:24 am

Did you clear cache?
Jewish Kid: Is anyone else having problems concentrating on this? I just can't seem to concentrate.
Cartman: Maybe we should send you to a concentration camp.
User avatar
Vladd44
Site Admin
 
Posts: 4441
Joined: Wed Dec 31, 1969 7:00 pm
Location: New Orleans Crypt 69
  • Website
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Sky on Wed Sep 24, 2008 6:29 am

Yes.
User avatar
Sky
 
Posts: 10
Joined: Tue Sep 23, 2008 1:38 pm
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Vladd44 on Wed Sep 24, 2008 7:30 am

Does it show a different page of smileys if you were to manually change the address
such as

http://yourdomain.com/posting.php?mode=smilies&start=50

Also, in styles/prosilver/template/posting_smilies.

Code: Select all
#
#-----[ FIND ]---------------------------------------------------
#
<!-- BEGIN smiley -->

#
#-----[ BEFORE, ADD ]---------------------------------------------
#
<span class="genmed">Pages {PAGINATION}</span>

Then clear cache, does at least the word pages show up?

If so, please recheck this section

Code: Select all
#
#-----[ FIND ]---------------------------------------------------
#
page_footer();
#
#-----[ Before, ADD ]-------------------------------------------
#
// additions to pagination
if ($start){
$cp = $start / $smiley_limit+1;
} else {
$cp = 1;
}
$pagination = '';
$ref = $db->sql_query('SELECT * FROM '. SMILIES_TABLE );
$n_smiles = $db->sql_affectedrows('SELECT * FROM '. SMILIES_TABLE );
$total_pages =ceil($n_smiles/$smiley_limit);
for ($apl=1; $apl<=$total_pages; $apl++) {
$pagination.= '<a href="'.$phpbb_root_path.'posting.php?mode=smilies&start='.(($apl-1)*$smiley_limit).'"> '.$apl.' ';
}
$pagination = "
Now Showing Page $cp of $total_pages.
Total Pages $pagination
";
$template->assign_vars(array(
'PAGINATION' => $pagination ));
// end additon to pagination
Jewish Kid: Is anyone else having problems concentrating on this? I just can't seem to concentrate.
Cartman: Maybe we should send you to a concentration camp.
User avatar
Vladd44
Site Admin
 
Posts: 4441
Joined: Wed Dec 31, 1969 7:00 pm
Location: New Orleans Crypt 69
  • Website
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Sky on Wed Sep 24, 2008 8:16 am

Vladd44 wrote:Does it show a different page of smileys if you were to manually change the address
such as

http://yourdomain.com/posting.php?mode=smilies&start=50

Yes, this takes me to page three of smileys (I set the display limit to 25), with the link to go to pages one and two.
Vladd44 wrote:Also, in styles/prosilver/template/posting_smilies.

Code: Select all
#
#-----[ FIND ]---------------------------------------------------
#
<!-- BEGIN smiley -->

#
#-----[ BEFORE, ADD ]---------------------------------------------
#
<span class="genmed">Pages {PAGINATION}</span>

Then clear cache, does at least the word pages show up?

No, nothing changes. I have the word 'Smilies' at the top of the smiley display (as before), but no other words.
User avatar
Sky
 
Posts: 10
Joined: Tue Sep 23, 2008 1:38 pm
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Vladd44 on Wed Sep 24, 2008 8:24 am

Clarify the bold part please.

sky wrote:Yes, this takes me to page three of smileys (I set the display limit to 25), with the link to go to pages one and two.


And the word pages does not show up at all?
Jewish Kid: Is anyone else having problems concentrating on this? I just can't seem to concentrate.
Cartman: Maybe we should send you to a concentration camp.
User avatar
Vladd44
Site Admin
 
Posts: 4441
Joined: Wed Dec 31, 1969 7:00 pm
Location: New Orleans Crypt 69
  • Website
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Sky on Wed Sep 24, 2008 8:32 am

This gives me a page with the words 'Pages Now Showing Page 3 of 3. Total Pages 1 2 3' (where 1 and 2 are links) followed by the smileys.

The word 'Pages' does not appear anywhere on the posting page - I even did a search in case I'd missed it, just the first page of 25 smilies with the heading 'Smilies'.
User avatar
Sky
 
Posts: 10
Joined: Tue Sep 23, 2008 1:38 pm
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Vladd44 on Wed Sep 24, 2008 8:40 am

'Pages Now Showing Page 3 of 3. Total Pages 1 2 3'


It has to be a cache issue, Since both the word 'Pages' is showing up (First word) and followed by the pagination itself (Now Showing Page 3 of 3. Total Pages 1 2 3') showed on the following pages when you went to them (for the first time) manually.

Go back to admin panel and clear the cache again.
Jewish Kid: Is anyone else having problems concentrating on this? I just can't seem to concentrate.
Cartman: Maybe we should send you to a concentration camp.
User avatar
Vladd44
Site Admin
 
Posts: 4441
Joined: Wed Dec 31, 1969 7:00 pm
Location: New Orleans Crypt 69
  • Website
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Sky on Wed Sep 24, 2008 8:53 am

I have cleared the cache again (several times), with no difference.
User avatar
Sky
 
Posts: 10
Joined: Tue Sep 23, 2008 1:38 pm
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Vladd44 on Wed Sep 24, 2008 9:30 am

Let me explain my dilemma.

You added the word Pages styles/prosilver/template/posting_smilies.html, but it doesn't show on the first page..but does on the others?

There is no way for this to happen, unless it is using another html template. That is the reason I had you add it.

Other than the phpbb3 internal caching system I cannot imagine ANYTHING that could cause this problem.

Care to send me a link to your forum via pm or post it in a link, either way.
Jewish Kid: Is anyone else having problems concentrating on this? I just can't seem to concentrate.
Cartman: Maybe we should send you to a concentration camp.
User avatar
Vladd44
Site Admin
 
Posts: 4441
Joined: Wed Dec 31, 1969 7:00 pm
Location: New Orleans Crypt 69
  • Website
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Sky on Wed Sep 24, 2008 9:40 am

I expect I'm explaining things badly. :oops:

It doesn't appear on the posting page, but if I go to myforums/posting.php?mode=smilies&start=50 it shows up, and if I go to /posting.php?mode=smilies&start=0, which is page one, it shows up there too - but these are just pages of smilies.

It is just the posting page where it doesn't appear, so there's no way for my members to access the second and third pages of smilies.

I'll PM you the link.
User avatar
Sky
 
Posts: 10
Joined: Tue Sep 23, 2008 1:38 pm
Top

Re: Simple phpBB3 Smiley Pagination Mod V1

Postby Vladd44 on Wed Sep 24, 2008 11:43 am

As opposed to where mine has a "view more smilies" link?

Give me a sec, and I will sort out where to add one, I noticed my default subsilver did not have such a thing either.
Jewish Kid: Is anyone else having problems concentrating on this? I just can't seem to concentrate.
Cartman: Maybe we should send you to a concentration camp.
User avatar
Vladd44
Site Admin
 
Posts: 4441
Joined: Wed Dec 31, 1969 7:00 pm
Location: New Orleans Crypt 69
  • Website
Top

Next

Post a reply
38 posts • Page 1 of 2 • 1, 2

Return to phpBB3 Mods

Who is online

Users browsing this forum: No registered users and 0 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC - 6 hours [ DST ]
  • SitemapIndex SitemapIndex
  • RSS Feed RSS Feed
  • Channel list Channel list
© 2000, 2002, 2005, 2007 phpBB Group •
phpBB SEO
created by stylerbb.net & nero