Welcome, Guest. Please Login or Register.
May 05, 2024, 10:21:57 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.5.2] Ultimate Shoutbox v.1.1 « previous next »
Pages: 1 [2] 3 Reply Ignore Print
Author Topic: [Done 1.5.2] Ultimate Shoutbox v.1.1  (Read 6504 times)
Daniel D.
Mod Team
YaBB God
*****
Posts: 2935


Re:[Done 1.5.2] Ultimate Shoutbox v.1.1
« Reply #15 on: April 30, 2003, 06:49:49 PM »
Reply with quote

Quote from: oldiesmann on April 30, 2003, 05:55:07 PM
Well, why not add on to that by giving the forum admin more options as to what to do with older shouts? They could choose to automatically delete older shouts or have them go to a "shout archive" where they wouldn't get deleted and then let others view the older shouts by having a link to the "archive"
Yes, yes, yes, yes... ;D
German translation in a few minutes/hours.
Logged

haase
Full Member
***
Posts: 224


Do you feel lucky?

Re:[Done 1.5.2] Ultimate Shoutbox v.1.1
« Reply #16 on: April 30, 2003, 07:06:48 PM »
Reply with quote

Are you doing the translation then? that's awesome!

As far as all the delete and archives options: anything is possible, but I'd like to try to keep it as simple as possible...  you start adding all these crazy options and before you know it you have a full page of options and most people won't use any of them anyway.
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[Done 1.5.2] Ultimate Shoutbox v.1.1
« Reply #17 on: April 30, 2003, 10:36:19 PM »
Reply with quote

Actually, my code has a bug.

Should be:
//Now we're ready to insert the shout  
  $result=MYSQL_QUERY("INSERT INTO {$db_prefix}shoutbox (name, displayname, message,time,email) VALUES ('$HTTP_POST_VARS[name]', '$HTTP_POST_VARS[displayname]', '$message','$time','$HTTP_POST_VARS[email]')");

  // Find and delete old shouts.
 $result = mysql_query("
     SELECT count(id)
     FROM {$db_prefix}shouts");
 list ($shoutcount) = mysql_fetch_row($result);
 mysql_free_result($result);

  if ($shoutcount - $GLOBALS['modSettings']['shoutlimit'] > 0)
     mysql_query("
        DELETE FROM {$db_prefix}shouts
        ORDER BY id ASC
        LIMIT " . ($shoutcount - $GLOBALS['modSettings']['shoutlimit']));

header("Location: index.php");
}


As far as my modSettings comment, my only excuse is that I'm sick and blood comes out when I blow my nose.  Not really in the best of moods - in fact I'm *quite* grumpy.

-[Unknown]
Logged
haase
Full Member
***
Posts: 224


Do you feel lucky?

Re:[Done 1.5.2] Ultimate Shoutbox v.1.1
« Reply #18 on: April 30, 2003, 10:52:40 PM »
Reply with quote

Your code also has another bug...  the table name is wrong!  It should be shoutbox and you have it as shouts (see first INSERT query).

What was the other bug by the way.  I tried to install your Mod, and ever since I did, my shoutbox does not work...  even if I delete shout.php and put my backup in there.

Oh, and I ran some stats on that temporary table.  With the shouts running in Descending order (bypassing the temp table) page times ranged from 0.178 - 0.191 seconds with an average time of 0.184.  With shouts running in Ascending order, using the temp table, page times ranged from 0.179 - 0.206 with an average time of 0.188.  This was with series of 10 shouts, each one with identical data.  And actually the next highest after that 0.206 was 0.193, so without that one oddity, it would have been much closer.  Still, the point is...  4 thousands of a second is not something that I would call "additional overhead".

Oh...  and no hard feelings.  I hope you feel better.  And I hope you still show me how to bypass the temp variables ;)
« Last Edit: April 30, 2003, 10:53:31 PM by greghaase » Logged
haase
Full Member
***
Posts: 224


Do you feel lucky?

Re:[Done 1.5.2] Ultimate Shoutbox v.1.1
« Reply #19 on: May 01, 2003, 12:22:25 AM »
Reply with quote

Quote from: greghaase on April 30, 2003, 10:52:40 PM
I tried to install your Mod, and ever since I did, my shoutbox does not work...  even if I delete shout.php and put my backup in there.

I figured out what was wrong.  Somehow the next value for the autoincrement got reset to a lower number.  This caused the shout function to try to insert a row with an ID that already existed.
Logged
GauGau
Noobie
*
Posts: 18


Klugscheisserei grood recht!

WWW
html-standards compliance
« Reply #20 on: May 01, 2003, 02:21:28 PM »
Reply with quote

wow Greg, great mod! I've been looking for something like that all the time (more lightweight than a chat, userfriendly!). Great job!

If have some remarks for the code of shout.php - to make it xhtml 1.0 -standards-compliant you have to use lower-case html-tags and parameters in tags must be given in double quotes; all open tags must be closed:
change <INPUT TYPE='hidden' value='$username' NAME='name'> to <input type=\"hidden\" value=\"$username\" name=\"name\" />. There's no such thing as <br \>, replace it with <br />

Finally I suggest clearing the input field on focus: change<INPUT TYPE='text' value='message' NAME='message' maxlength='100'> to <input type=\"text\" value=\"message\" name=\"message\" maxlength=\"100\"  onfocus=\"this.value=''\" />

again, thanks for this mod!

GauGau
Logged
haase
Full Member
***
Posts: 224


Do you feel lucky?

Re:html-standards compliance
« Reply #21 on: May 01, 2003, 02:40:46 PM »
Reply with quote

Quote from: GauGau on May 01, 2003, 02:21:28 PM
Finally I suggest clearing the input field on focus: change<INPUT TYPE='text' value='message' NAME='message' maxlength='100'> to <input type=\"text\" value=\"message\" name=\"message\" maxlength=\"100\"  onfocus=\"this.value=''\" />

again, thanks for this mod!

GauGau

Damn!!!  I was looking forever for how to do that!  Thank you.
Logged
chillinhh
Noobie
*
Posts: 25


I'm a llama!

Re:[Done 1.5.2] Ultimate Shoutbox v.1.1
« Reply #22 on: May 13, 2003, 02:18:24 AM »
Reply with quote

Will it not work with version 1.5.1 yabbse? Because when i try installing it with board mod this happens
now installing: Shoutbox 1.3 (shoutbox_v1_3.mod)

--------------------------------------------------------------------------------



Step 1 ... ok

Step 2 ... ok

Step 3 ... ok

Step 4 ... failed - ERR(1): Search string could not be found

Step 5 ... ok

Step 6 ... failed - ERR(1): Search string could not be found

Step 7 ... ok

Step 8 ... ok

Step 9 ... ok

Step 10 ... ok

Step 11 ... ok

Step 12 ... ok



> modifications failed! 2 errors occured. No files will be modified. Please see readme for help on the
error messages.
Logged
haase
Full Member
***
Posts: 224


Do you feel lucky?

Re:[Done 1.5.2] Ultimate Shoutbox v.1.1
« Reply #23 on: May 13, 2003, 12:50:00 PM »
Reply with quote

You should really upgrade to 1.5.2 for security reasons.

Your step 4 error could occur if there's been nother mod that put something in the globals.  look for something like this in your ModSettings.php file   global $txt, $img, $yytitle, $cgi, $scripturl, $imagesdir, $color, $mtxt, $modSettings, $db_prefix

and after it add on a new lineglobal $shoutbox;


I'm not sure why the last string can't be found.  Several mods use that, as it's the last row on the Mod Settings display.  What other mods have you installed?


Logged
chillinhh
Noobie
*
Posts: 25


I'm a llama!

Re:[Done 1.5.2] Ultimate Shoutbox v.1.1
« Reply #24 on: May 13, 2003, 10:03:39 PM »
Reply with quote

Only a skin mod as far as i can remember and there isnt a    global $txt, $img, $yytitle, $cgi, $scripturl, $imagesdir, $color, $mtxt, $modSettings, $db_prefix

in modsettings.php
Logged
haase
Full Member
***
Posts: 224


Do you feel lucky?

Re:[Done 1.5.2] Ultimate Shoutbox v.1.1
« Reply #25 on: May 14, 2003, 12:20:22 AM »
Reply with quote

Quote from: chillinhh on May 13, 2003, 10:03:39 PM
Only a skin mod as far as i can remember and there isnt a    global $txt, $img, $yytitle, $cgi, $scripturl, $imagesdir, $color, $mtxt, $modSettings, $db_prefix

in modsettings.php

::)  Of course not, otherwise Boardmod wouldn't have any trouble finding it.  I meant to look for something like it.  Since there is only 1 global line in the file and it's right at the top, you shouldn't have too much trouble finding it.

For the second part, look for this text <input type="submit" value="' . $txt[10] . '" />.  Once you find it, copy 5 lines before it and 5 lines after it and posted in a reply here and I should be able to help you.
Logged
loudog
Noobie
*
Posts: 19


I'm a llama!

Re:[Done 1.5.2] Ultimate Shoutbox v.1.1
« Reply #26 on: May 14, 2003, 10:29:12 AM »
Reply with quote

I installed shout box. The mods worked fine with board mod, so did the shoutdb.php run. I uploaded all the files with no problems and both the admin, and index pages show the shout box fine. However, when you try to type a shout, it first promps you if you want to save or open this file PHP_AUTO_FILE . If you go back to my page, the shout shows up, even if you do nothing with the promp. The other two problems I find, is that the X image delete function will only give me a "this page can't be displayed", and when you use the horisontal rule code, in either yabb, or HTML it only shows up as code and not a rule bar. Any help or suggestions would be great, thanks in advance, Lou PS: from your website this appears to be version 1.3
« Last Edit: May 14, 2003, 10:33:46 AM by loudog » Logged
haase
Full Member
***
Posts: 224


Do you feel lucky?

Re:[Done 1.5.2] Ultimate Shoutbox v.1.1
« Reply #27 on: May 14, 2003, 03:55:44 PM »
Reply with quote

I'm not sure about the first issue, maybe it's a permissions thing?  I'm assuming you did load the shout.php file into your sources folder.  Also, I'm assuming that you're using YaBB SE 1.5.2.

When you click the delete button, does the shout get deleted, or does it actually delete the shout, or just give you the error.  When you get the "page cannot be displayed" error, what is the URL in the address bar? (which page is not diplaying).

Also, I've seen the <HR> separator on several sites and it appears to work there (as well as my own).  On this one, I need to know what other mods you have installed and also what value is actually stored in your settings table (e.g. &lt;HR&gt; or <HR>).  There is one place that I have seen it show <hr> instead of the rule, and thats in the admin center...  please verify that its not working on other pages as well.
Logged
haase
Full Member
***
Posts: 224


Do you feel lucky?

Re:[Done 1.5.2] Ultimate Shoutbox v.1.1
« Reply #28 on: May 15, 2003, 12:35:14 AM »
Reply with quote

Loudog,

Someone else on the PfaBB site had a similar issue with the delete button, and I think I found the problem.  Try uploading this shout.php file and see if that takes care of it.  For everyone else, I've updated the file in the 1.3 package as well.
Logged
loudog
Noobie
*
Posts: 19


I'm a llama!

Re:[Done 1.5.2] Ultimate Shoutbox v.1.1
« Reply #29 on: May 15, 2003, 09:13:50 AM »
Reply with quote

Thanks a bunch, what ever you did to the new shout.php file, fixed all three problems? I'm not complaining though, its a great script. Thanks goes to you, and all the others who have put so much time into doing these scripts, and making this forum. Thanks again,

LD
Logged
Pages: 1 [2] 3 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.5.2] Ultimate Shoutbox v.1.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.071 seconds with 19 queries.