miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /  
 

Smileys

 
 
Page  Page 1 of 6:  1  2  3  4  5  6  Next »

Author namridus
Guest
#1 | Posted: 6 Sep 2005 23:37 
I'd like to make a page containing only smilies which can appear on a new page. And when a visitor click on a smiley it will be added into the message form. How can i do that

Author Team
8-)
#2 | Posted: 7 Sep 2005 11:55 
By default, it's already done when you click in HTML snippet on "..." after smilies list.

Author Vishal
Partaker
#3 | Posted: 7 Oct 2005 14:54 
I want to try middle aligning smilies, "align=middle". I know how to to this while posting (in addon_smilies2.php):

if ($aPost) {
foreach($GLOBALS['smilies']
as $key=>$val) $postText=str_replace($key, "[imgmiddle]".$GLOBALS['main_url']."/img/".$GLOBALS['dirname']."/".$val."[ /img]", $postText);

But I can't get it while editing posts using:

elseif ($aEdit) {
foreach($GLOBALS['smilies']
as $key=>$val) $postText=str_replace("[img(middle)?]".$GLOBALS['main_url']."/img/".$GLOBALS['dirname']."/".$val ."[/img]", $key, $postText);

Author Team
8-)
#4 | Posted: 7 Oct 2005 16:54 
I 'm not sure, but there was an attribute absmiddle sometimes which is probably what you want.

So, what's exactly not working? Don't forget that your REPLACEMENT code must handle all brackets.

$replacement[]="[img\\4]\\2[/img]";

probably, there will be something like this.

Author Vishal
Partaker
#5 | Posted: 8 Oct 2005 08:17 
So, what's exactly not working?

I can get the smily to middle align but I can't get the smily key back when I try to edit the post. It shows:

[imgmiddle]smily_url[/img]

I have edited the bb_codes to reflect (left|right|middle) in all instances of img tags.

Author Team
8-)
#6 | Posted: 8 Oct 2005 17:54 
So, you need to edit addon_smilies2.php itself, because it parses only [img] tag.

Author Vishal
Partaker
#7 | Posted: 9 Oct 2005 07:56 
That's I'm not able to do in elseif ($aEdit) condition as mentioned in first post.

Author Team
8-)
#8 | Posted: 9 Oct 2005 18:09 
Oh :) Closer to the problem - str_replace doesn't work with regular expression, it works only with straight string.

So you need to use something like this:

foreach($GLOBALS['smilies']
as $key=>$val) {
$repl1='[img]'.$GLOBALS['main_url'].'/img/'.$GLOBALS['dirname'].'/'.$v al.'[/img]';
$repl2='[imgmiddle]'.$GLOBALS['main_url'].'/img/'.$GLOBALS['dirname']. '/'.$val.'[/imgmiddle]';

$postText=str_replace(array($repl1, $repl2), $key, $postText);

}

Author Caleb
Partaker
#9 | Posted: 5 Feb 2006 21:52 
Hello.
Ive got some problem.
I want to disable [img] tag for users, but i want smiles working. (there are some reasons)
How can i do it?

Author Team
8-)
#10 | Posted: 6 Feb 2006 09:04 
So, just create some new tag, for example, [smile], then replace it everywhere in the smilies addon script.

Author Caleb
Partaker
#11 | Posted: 6 Feb 2006 09:29 
heh...I allready did it :) And there is no other ways?
Anyway Thnx!

Author Team
8-)
#12 | Posted: 6 Feb 2006 09:57 
I think, this is the most simple, and probably the only one way.

Author RFunk
Guest
#13 | Posted: 26 Apr 2006 19:04 
After installing the Smilies addon, I got it to work, I can actually post the smilies BUT after posting a message using smilies I get this error message

"Fatal error: Cannot redeclare smilethis() (previously declared in c:appservwwwforumaddon_smilies2.php:11) in c:appservwwwforumaddon_smilies2.php on line 11"

The message get posted with the smilie but you get that error message for some reason.

Any ideas how to fix this?

Author RFunk
Guest
#14 | Posted: 26 Apr 2006 19:11 
Fixed it, the README file tells you to declare the smilie php file twice (in diferent files) I just deleted one of the declarations and it worked fine

README DECLARATIONS:


* Edit your language pack(s) (/lang/eng.php or whatever) and paste to the end of file (translate if necessary):

/* Smilies language */
$l_disableSmilies='Disable smilies';

* Edit bb_plugins.php and copy/paste this code:

/* Smilies addon */
if(($action=='ptopic' or $action=='pthread' or $action=='editmsg' or $action=='editmsg2' or $action=='pmail') or (isset($_POST['prevForm']) and trim($_POST['postText'])!='')) include ($pathToFiles.'addon_smilies2.php');
/* --Smilies addon */

Author Team
8-)
#15 | Posted: 26 Apr 2006 19:41 
the README file tells you to declare the smilie php file twice (in diferent files) - sorry, but we didn't understand this. It which place it's declared twice? You need to paste this inclusion only in bb_plugins.php... what else mentioned?

Page  Page 1 of 6:  1  2  3  4  5  6  Next » 
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /
 Smileys
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑