• Index :: PHPBB3 Modifications :: Simple phpBB3 Smiley Pagination Mod
  • Change font size
  • •

It is currently 06:01 am Tue May 21 2013

  • Home
  • WinMX
  • BitTorrent
  • Video
  • Computer Problem
  • Ubuntu/Linux
  • PHP scripts & phpBB3 Mods
  • Forums

Simple phpBB3 Smiley Pagination Mod



I noticed there were several people looking for a pagination mod for the new version of phpbb (phpbb3), but no one had released anything to do the job.

The following code is simple, it does not even go into previous and next alternatives. It is a basic, pagination script for smilies, nothing more.

Perhaps at another time I may feel compelled to improve upon it, but as of now, it serves the purpose.

There is no guarantees implied or otherwise, using this mod could cause sterility in mice, turn the pope agnostic, or even get Bill Clinton laid. Well, perhaps he doesn't need help. Even more likely none of those will happen and it will do exactly as implied.

But you cannot say you have not been warned. Simple phpBB3 smilie pagination MOD.

For support, additional questions or Feature request with NO Guarantees, feel free to visit our phpbb3 and PHP Forum

If You have no View More Smilies Link

Some have had fits because they could not get a view more smilies link to come up. This would be due to the fact that all smiles are listed to appear on posting page. To fix this at least some (perhaps as few as 1) need to be changed to not display on posting page.

From FLATTOP

Go to your admin panel and select the Posting tab at top, then click on smilies on the left hand side. that will bring up your entire list of smilies, on the right side you will see options such as move up, move down, delete, edit. click on edit, that will bring up a new page for that individual smiley, you will see a check box for display on posting page, UNCHECK that box! that's how you get the view more smilies link to appear.

Thanks FLATTOP

One smilies unchecked should be enough to get the link to show (All your smilies should then be listed, not just the one you unchecked).

[code]
#################################################################
## MOD Title: Simple Smiley Pagination phpbb3 MOD
## MOD Author: Vladd44 < vladd44@vladd44.com > http://www.vladd44.com
## MOD Description: Limit how many smilies will appear on the smilies popup window
## with page links to the rest.
##
## MOD Version: 1.0.4
## phpBB3 Version: 3.0.2
##
## Installation Level: Easy
## Installation Time: 5 Minutes
##
## Files To Edit: includes/functions_posting.php
## styles/subsilver2/template/posting_smilies.html

##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v3
#################################################################
## History:
##
## 2008-09-15 - version 1.0.4
## 2008-09-14 - version 1.0.3
## 2008-09-14 - version 1.0.2
## 2008-09-01 - version 1.0.1
## 2008-06-19 - version 1.0.0
## - Initial Release.
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD.
#################################################################

#
#-----[ OPEN ]---------------------------------------------------
#
includes/functions_posting.php

#
#-----[ FIND ]---------------------------------------------------
#
$sql = 'SELECT *
FROM ' . SMILIES_TABLE .
(($mode == 'inline') ? ' WHERE display_on_posting = 1 ' : '') . '
ORDER BY smiley_order';

#
#-----[ REPLACE WITH ]-------------------------------------------
#
// For pagination.
$smiley_limit = 100;
if (isset($_GET['start'])) {
$start = intval($_GET['start']);
} else {
$start =0;
}
$sql = 'SELECT *
FROM ' . SMILIES_TABLE .
(($mode == 'inline') ? ' WHERE display_on_posting = 1 ' : '') . '
ORDER BY smiley_order ASC LIMIT '.$start.', '.$smiley_limit.'';
// end pagination





#
#-----[ 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






#
#-----[ OPEN ]---------------------------------------------------
#

styles/subsilver2/template/posting_smilies.html

#
#-----[ FIND ]---------------------------------------------------
#
<!-- BEGIN smiley -->

#
#-----[ BEFORE, ADD ]---------------------------------------------
#
<tr>
<td align="center"><span class="genmed">{PAGINATION}</span></td>
</tr>

#
#
#-----[ OPEN ]---------------------------------------------------
#

styles/prosilver/template/posting_smilies.html

#
#-----[ FIND ]---------------------------------------------------
#
<!-- BEGIN smiley -->

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

#
#-----[ SAVE/CLOSE ALL FILES ]-----------------------------------
#
# EoM
[/code]







Common Misspelled words on this page are addtional allign alternitives adn, anbd anohter anytying bakc, bcak baceause, beacuse, becasue, beccause, becouse, becuase bedore, befoer, befor beggin bu cannnot, cant clas coudl, sould doens doesnt, dosen't alse, esle fiel fiels fidn firt, firts follwoing, folowing fomr, frome genera garantees, gaurantees, gaurentees, guarentees, gurantees ahppen, hapen ahev, ahve, haev, hvae, hvea heighth, heigth, hieght, hieght, hieght halp inital, intial inot jstu layed lefted liscense, lisence, lisense moreso, mroe, omre ened enxt nto, onot nowe peopel perhasp, perheaps, perhpas, perphas previvous pubic perphas relace scirpt severeal shoudl, shoudln, sould sohw smoe, soem strat sylte, stlye, sytle wupport taht, tath, thast, thgat, thta, thyat hten, tghe, ther, thge, tjhe thne their, ther htey, tehy, tyhe htis, thsi, tihs ethose, thsoe tiem, timne, tiome uopn, apon useing verison wiew vell iwll, wille, wiull owudl, woudl
© 2003, 2004, 2005, 2006, 2007 2008 Vladd44.com Privacy Policy.