Welcome, Guest. Please Login or Register.
November 23, 2024, 05:22:21 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.5.1 > 1.5.4] Add More Smilies 2.1 « previous next »
Pages: 1 ... 48 49 [50] 51 52 ... 62 Reply Ignore Print
Author Topic: [Done 1.5.1 > 1.5.4] Add More Smilies 2.1  (Read 880679 times)
chris
Guest
Re:[Done 1.5.1 & 1.5.2] Add More Smilies 2.0
« Reply #735 on: May 01, 2003, 02:09:27 PM »
Reply with quote

uhmm... and btw.... you're accessing the smilies-directory on numerous places... i think it would be much easier to use one funtion to read the directory instead of coding the same stuff over and over again ;D

I wrote a little something...

function readSmileyDir()
{
   global $boarddir,$boardurl;

   $dir_to_open   = $boarddir.'/smilies';
   $dh      = opendir($dir_to_open);
   $smileydata   = array();

   while ($file = readdir($dh))
   {

      if (is_file($dir_to_open.'/'.$file))
      {

         $path_parts   = pathinfo($file);
         if ((strtolower($path_parts['extension'])=='gif') || (strtolower($path_parts['extension'])=='png') || (strtolower($path_parts['extension'])=='jpg') || (strtolower($path_parts['extension'])=='jpeg'))
         {
            $smileydata[]   = array ( 'desc'   => basename($path_parts['basename'],'.'.$path_parts['extension']),
                       'code'   => ':'.basename($path_parts['basename'],'.'.$path_parts['extension']).':',
                       'url'      => $boardurl.'/smilies/'.$file);
         }

      }

   }

   return $smileydata;
}


so you could simply do something like this in subs.php:

      else if ($modSettings['smileydirEnable'] == '1')
      {

         $smilies   = readSmileyDir();
         
         foreach ($smilies as $cursmiley)
         {
            $message   = str_replace($cursmiley['code'],'<img src="'.$cursmiley['url'].'" alt="'.$cursmiley['desc'].'" />',$message);
         }

      }


I think this would reduce the size of the code and makes it easier to change things..... ;D

(the above code is mostly UNTESTED!)
Logged
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:[Done 1.5.1 & 1.5.2] Add More Smilies 2.0
« Reply #736 on: May 01, 2003, 10:30:37 PM »
Reply with quote

OMG! Why can't this mod die!!? I'm trying to devot all my time to PHPNews!

All of above are great suggestions Christian, but I wrote the V2 code like a year ago! I dont want to bother updating it! But.... I suppose I might as well!
Logged

PHPNews has been released!!! Download it now!!!
chris
Guest
Re:[Done 1.5.1 & 1.5.2] Add More Smilies 2.0
« Reply #737 on: May 02, 2003, 06:57:52 AM »
Reply with quote

Quote from: Big P on May 01, 2003, 10:30:37 PM
OMG! Why can't this mod die!!? I'm trying to devot all my time to PHPNews!

All of above are great suggestions Christian, but I wrote the V2 code like a year ago! I dont want to bother updating it! But.... I suppose I might as well!

I'm currently writing my own Smilies-MOD.... ;D
Logged
PeterPaul
Sr. Member
****
Posts: 262


Los buenos simpre ganan, paciencia amigos.

ICQ - 92250610peterpaulxxx@hotmail.com WWW
Re:[Done 1.5.1 & 1.5.2] Add More Smilies 2.0
« Reply #738 on: May 03, 2003, 02:34:25 AM »
Reply with quote

Oh i've added some tables, modified some files and upload these.

And now, i can say, THIS IS THE BEST MOD



THANK YOU BIG P and ALL THE YABBSE TEAM,

YOU ARE THE BEST
Logged

==================================
Saludos Cordiales
Fdo: PeterPaul

WEBMASTERS PETERPAULXXX.COM
http://www.peterpaulxxx.com
Relatos Eroticos
http://www.peterpaulxxx.com/relatos
Foro de Oficial de PETERPAULXXX
http://www.peterpaulxxx.com/foro
==================================
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:[Done 1.5.1 & 1.5.2] Add More Smilies 2.0
« Reply #739 on: May 03, 2003, 04:14:14 PM »
Reply with quote

Quote from: Christian Land on May 02, 2003, 06:57:52 AM
Quote from: Big P on May 01, 2003, 10:30:37 PM
OMG! Why can't this mod die!!? I'm trying to devot all my time to PHPNews!

All of above are great suggestions Christian, but I wrote the V2 code like a year ago! I dont want to bother updating it! But.... I suppose I might as well!

I'm currently writing my own Smilies-MOD.... ;D
Why bother? There are like 3 (unless you mean for ......?)
Logged

PHPNews has been released!!! Download it now!!!
chris
Guest
Re:[Done 1.5.1 & 1.5.2] Add More Smilies 2.0
« Reply #740 on: May 03, 2003, 07:56:00 PM »
Reply with quote

Quote from: Big P on May 03, 2003, 04:14:14 PMWhy bother? There are like 3 (unless you mean for ......?)

No, not for ....... ;D But it could VERY easily be added to ...... ;D ;D ;D

I'm writing it mostly because I don't like the existing versions.... and mine allows Smiley-Upload ;D
Logged
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:[Done 1.5.1 & 1.5.2] Add More Smilies 2.0
« Reply #741 on: May 03, 2003, 08:14:45 PM »
Reply with quote

Meh!

Let the battles begin! :P

Anyhow, I've been rewriting the Smilies Mod, not adding any new features but I have been improving its speed.

I have a beta of the next version, if someone could test it out. It *should* work, as I've tested it and it worked fine for me.
« Last Edit: May 07, 2003, 09:44:05 PM by Big P » Logged

PHPNews has been released!!! Download it now!!!
Douglas
aka The Bear
Support Team
YaBB God
*****
Posts: 1050


Bears rule! Llamas rule too!

WWW
Re:[Done 1.5.1 & 1.5.2] Add More Smilies 2.0
« Reply #742 on: May 04, 2003, 03:18:19 AM »
Reply with quote

Send it here, I have one site that wants it.
Logged

Need help? Please SEARCH first.  No need for a bad attitude, we like helping positive minded people.
ComeHit.us Short URL  redirection svcs with YSE powered forums, COMING SOON!
Want to say thanks?  Check out http://comehit.us/?u=3
Ben_S
Disciple of Joe
Support Team
YaBB God
*****
Posts: 1586


I Love YaBB SE!

WWW
Re:[Done 1.5.1 & 1.5.2] Add More Smilies 2.0
« Reply #743 on: May 04, 2003, 11:37:01 AM »
Reply with quote

Quote from: Douglas on May 04, 2003, 03:18:19 AM
Send it here, I have one site that wants it.
He attached it ;)
Logged
oldiesmann
YaBB God
*****
Posts: 577


Jesus died for your sins... Have you thanked him?

oldiesmann@oldiesmann.us WWW
Re:[Done 1.5.1 & 1.5.2] Add More Smilies 2.0
« Reply #744 on: May 05, 2003, 01:27:23 AM »
Reply with quote

Quote from: Big P on May 03, 2003, 08:14:45 PM
Meh!

Let the battles begin! :P

Anyhow, I've been rewriting the Smilies Mod, not adding any new features but I have been improving its speed.

I have a beta of the next version, if someone could test it out. It *should* work, as I've tested it and it worked fine for me.

Is the version that you attached the beta version or is there another version on its way? I've set up a "test" board on Lycos UK (the one I've been using to test mods), and I will gladly test it for you...
Logged

"I've sinned greatly, but Christ's for real, baby
It's a wonder He saved me and just didn't hate me
So won't you tell Him "Save me"
Please stand up, please stand up, please stand up..." - J. Jackson (More Info)
Ricbr
Noobie
*
Posts: 14


I'm a llama!

Re:[Done 1.5.1 & 1.5.2] Add More Smilies 2.0
« Reply #745 on: May 05, 2003, 01:35:18 PM »
Reply with quote

I have installed the mod and can see all the smilies to add to a message...however when i click on them to add them to a message...they never add.  I can type in the text needed to add the smiley...but is there a trick to allow me to add them by clicking on them?

Appreciate the help in advance.

Ric
Logged
oldiesmann
YaBB God
*****
Posts: 577


Jesus died for your sins... Have you thanked him?

oldiesmann@oldiesmann.us WWW
Re:[Done 1.5.1 & 1.5.2] Add More Smilies 2.0
« Reply #746 on: May 05, 2003, 03:28:27 PM »
Reply with quote

Make sure you editied your code properly... I think the part that allows you to click on smilies to add them is in post.php...
Logged

"I've sinned greatly, but Christ's for real, baby
It's a wonder He saved me and just didn't hate me
So won't you tell Him "Save me"
Please stand up, please stand up, please stand up..." - J. Jackson (More Info)
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:[Done 1.5.1 & 1.5.2] Add More Smilies 2.0
« Reply #747 on: May 05, 2003, 10:25:23 PM »
Reply with quote

Yeah, the latest code was attached above.  Plus that error was most likely the mods fault, as it is in Beta. I'll test it out tomorrow on a clean install and let you know if I find the error.  ;)
Logged

PHPNews has been released!!! Download it now!!!
Juvenall Wilson
Full Member
***
Posts: 162


Eat more vegetarians

ICQ - 83740832switchTone@hotmail.com
Re:[Done 1.5.1 & 1.5.2] Add More Smilies 2.0
« Reply #748 on: May 07, 2003, 07:16:57 PM »
Reply with quote

Here's a quick addon if you will. I was getting complaints from users that if the vB style window was open, they couldn't navagate any place else.

Now, I don't know if this was said/posted here before, this thread is far too big to sort through..lol

Anyhow,

<edit file>
Sources/Smilies.php
</edit file>

<search for>
<BODY bgcolor="' . $color['windowbg2'] . '" onblur="this.focus();">
</search for>

<replace>
<BODY bgcolor="' . $color['windowbg2'] . '">
</replace>


Now users don't have to close it to go to another program or navagate in IE..:)
« Last Edit: May 07, 2003, 07:17:51 PM by Juvenall Wilson » Logged

Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:[Done 1.5.1 & 1.5.2] Add More Smilies 2.0
« Reply #749 on: May 07, 2003, 07:36:03 PM »
Reply with quote

Err, that's an add-on that people wanted. If you want to move around close the window! Anyway, as I said, it was requested.
Now, I'm still owrking on Smilies 2.1, which is coming along very nicely :)
Logged

PHPNews has been released!!! Download it now!!!
Pages: 1 ... 48 49 [50] 51 52 ... 62 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.5.1 > 1.5.4] Add More Smilies 2.1 « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.143 seconds with 20 queries.