News:

Join the Facebook Fan Page.

Main Menu

SMF Shoutbox

Started by Deep, March 15, 2006, 08:09:52 AM

Previous topic - Next topic

mbirth

Quote from: Kettu on August 05, 2006, 10:21:28 AMAs already said a couple of times, the Internal Server Error is caused by a CHMod Problem. Change the CHMod of the sboxDB.php from 777 to 644.

I rewrote the setup-script as proposed in the SMF Package SDK ... and I added a chmod(). Hope this will make things easier in the future.

Cheers,
  -mARKUS


NEVER contact me via ICQ/MSN/whatever for support inquiries unless I told you to do so! Use the forum threads instead.
Only send PMs if you need to tell me sensitive data.

Balmung

#261
Quote from: tL0z on August 05, 2006, 07:59:37 AM
Can anyone please make and history for this shoutbox? Also, how can I give permission to a group to be able to delete shouts?

Also, the shoutbox doesn't appear very well on opera and IE but its fine on Firefox. Take a look: www.NintendoPT.com/forum
You mean the Border around the iframe?

The Firefox shows standardly a border around an iframe with the optional Tag frameborder="1". The problem is that IE don't know this Tag, with frameborder="1" IE don't show any border.

Write this into the <iframe> Tag in sbox.template.php:<iframe... ... frameborder="0" style="border-width:2px; border-style:ridge;">

P.S. sorry for my bad english. :-\

tL0z

Here are some screenshots:

Firefox:



Opera:



As you can see, the shouts aren't in the center in Opera.

mbirth

Quote from: tL0z on August 05, 2006, 01:53:24 PMAs you can see, the shouts aren't in the center in Opera.

Just centered the input line in the v1.10 beta.

Cheers,
  -mARKUS


NEVER contact me via ICQ/MSN/whatever for support inquiries unless I told you to do so! Use the forum threads instead.
Only send PMs if you need to tell me sensitive data.

tL0z

That version isn't out yet right?

mbirth

Quote from: tL0z on August 05, 2006, 03:03:33 PMThat version isn't out yet right?

Take a look at this post.

Cheers,
  -mARKUS


NEVER contact me via ICQ/MSN/whatever for support inquiries unless I told you to do so! Use the forum threads instead.
Only send PMs if you need to tell me sensitive data.

tL0z

Eheh, it seems great, good job!  ;)
Should I unistall the current version first?

mbirth

Quote from: tL0z on August 05, 2006, 03:19:25 PMEheh, it seems great, good job!  ;)
Should I unistall the current version first?

I think so. Installing it over an old version would result in some weird things. So please remove the old version before installing the new one. :-)

Cheers,
  -mARKUS


NEVER contact me via ICQ/MSN/whatever for support inquiries unless I told you to do so! Use the forum threads instead.
Only send PMs if you need to tell me sensitive data.

littleone

Can you make your version to an upgrade mod?  I have lots of shouts and stuff and I would rather not delete it.  Is it possible to include an upgrade in your mod so that it can automatically adjust all the settings and databases as needed, so that I dont lose the shouts....

Also a history is a good thing.  Shout a forum only have 20 shouts then if someone is stupid it disappears to fast and the mods or admins might not have a chance to see it.  I have mine set to 200 lines which usually lasts about 12 to 18 hours which obviously gives us plenty of time, but I can see the need for a history ;)

Thanks

tL0z

I want the history for the same reason.

How can I hide the "refresh" button for the guests?

Also, there is a mistake in the portuguese translation, how can I correct it?

Kettu

Quote from: tL0z on August 05, 2006, 05:03:18 PM
Also, there is a mistake in the portuguese translation, how can I correct it?
Edit the modifications.portugese.php file.
Main Forum: SMF 2.0.6
Co-Forum: SMF 2.0.6

mbirth

Quote from: littleone on August 05, 2006, 04:39:46 PMCan you make your version to an upgrade mod?  I have lots of shouts and stuff and I would rather not delete it.  Is it possible to include an upgrade in your mod so that it can automatically adjust all the settings and databases as needed, so that I dont lose the shouts....

No, I'm sorry, you'll loose at least all nicknames and times of the shouts. And writing something that converts this all would take me too much time. It's a shoutbox, not a super-nifty multi-chat-something! Don't forget that!


Quote from: littleone on August 05, 2006, 04:39:46 PMAlso a history is a good thing.  Shout a forum only have 20 shouts then if someone is stupid it disappears to fast and the mods or admins might not have a chance to see it.  I have mine set to 200 lines which usually lasts about 12 to 18 hours which obviously gives us plenty of time, but I can see the need for a history ;)

Quote from: tL0z on August 05, 2006, 05:03:18 PM
I want the history for the same reason.

This is something right on top of the list for 1.11.


Quote from: tL0z on August 05, 2006, 05:03:18 PMHow can I hide the "refresh" button for the guests?

Why do you want to do that? However, find this line (this is from the 1.10, should look somewhat different in older versions):

<a href="' . $sourceurl . '/sboxDB.php?" target="sboxframe"><img src="'.$imgdir.'sbox_refresh.gif" border="0" width="16" height="17" align="absmiddle" alt="' . $txt['sbox_Refresh'] . '" /></a>'

and move it to this place:

<?php
if ((!
$context['user']['is_guest']) || ($modSettings['sbox_GuestAllowed'] == "1")) {
  echo '
         <input type="hidden" name="ts" value="'
.forum_time(true).'">
<a href="' 
$sourceurl '/sboxDB.php?" target="sboxframe"><img src="'.$imgdir.'sbox_refresh.gif" border="0" width="16" height="17" align="absmiddle" alt="' $txt['sbox_Refresh'] . '" /></a>
<input class="windowbg2" type="text" name="sboxText" size="100" maxlength="320" />&nbsp;<input type="submit" class="input" value="&nbsp;shout&nbsp;" />'
;
}
?>


Cheers,
  -mARKUS


NEVER contact me via ICQ/MSN/whatever for support inquiries unless I told you to do so! Use the forum threads instead.
Only send PMs if you need to tell me sensitive data.

denislici


i installed the fist shoutbox but there is no shoutbox table... i mean the shoutbox is but not its table, here is http://image05.resimlerim.us/files/1/3d132f2d-Untitled-2_copy.jpg .... and how can i add smileys ???
Love the Creature for Creator's sake. (English)
Duje Krijesen per hire te Krijuesit. (Albanian)
Yaradılan'ı sev Yaradan'dan ötürü. (Turkish)
Ami la Creatura per ce la creato il Creatore. (Italian)

mbirth

I - again - was in some hacking mood today so I implemented the HISTORY-feature.

Download here

See old changes here.

New changes:
* rewrote setup like in SMF's package SDK and also made it use db_query()
+ added CHMOD of sboxDB.php to 644 as some servers set it to 755 which leads to Internal Server Errors
* added frameborder="0" and a style-definition to show an own border
x JavaScript tried to set timestamp even if there was no input field in parent window ~~> lead to error message in MSIE
* moved collapsing-JavaScript to sbox.template.php (one file less to be changed by package manager)
x fixed selectable font-sizes (were "xp" instead of "px", changed them to point(pt) though)
+ added BBCode-option in settings
+ added option to switch off sbox completely for Guests
* centered input area so that the Refresh-button is also centered for Guests
+ added History-option in settings, but no code to handle it for now
+ added basic history feature with locked filewrite into .html-file
! Only Admins can see the link to history file for now - but it's readable for everyone


Have fun testing it!

Cheers,
  -mARKUS



NEVER contact me via ICQ/MSN/whatever for support inquiries unless I told you to do so! Use the forum threads instead.
Only send PMs if you need to tell me sensitive data.

boolprop_net

Quote from: mbirth on August 04, 2006, 05:36:43 AM
I got something for you.

I implemented the SMF Shoutbox into the SMF of my former school and added vast improvements. Now after contacting Deep, he asked me to continue support of sbox. I think I should be able to do this although please don't forget I'm doing this in my sparetime.

Does this have to be done manually because it won't work through the Package Manager?

SMF v1.0.7
boolprop.net [nofollow] - Under Construction
boolprop.net Family Forums [nofollow] - Active

mbirth

Quote from: boolprop_net on August 06, 2006, 11:43:04 PMDoes this have to be done manually because it won't work through the Package Manager?

SMF v1.0.7

It's for SMF 1.1rc2 and there is no version for 1.0.7.

Cheers,
  -mARKUS


NEVER contact me via ICQ/MSN/whatever for support inquiries unless I told you to do so! Use the forum threads instead.
Only send PMs if you need to tell me sensitive data.

Piwaille

hello

I've just been spammed :(

so ... it is possible to put html codes into the shoutbox....
so a robot (I think it is one) filed my shoutbox with spam <A ....><img ></A>

I could put the function htmlentities in order to (at least) translate the < > into &lt; and &gt;
but I would rather put something to simply avoid every hmtl code....
If I find a solution, I will post it here... but if someone has got the solution It would be nice If you could post it (and It would be a great idea to changed the shoutbox in the next version)

PS: While I was writing... maybe one solution would be to put an other code for visitors (like CAPTCHA ) ?
Piwaille
le chant du vario est motorisé par SMF 1.1.15

Kettu

Deep published a code to add to avoid html.
QuoteAttention please
After you have installed the shoutbox please modify the file sboxDB.php.

Please search for
// handle spacial characters
$content=addslashes($content);



and replace this with
// handle special characters
$content=addslashes($content);

// enquote html and script code to avoid html/javascript injection
$content = htmlentities($content, ENT_QUOTES);


This modification will prevent your shoutbox from being injected with html code and javascript code.

Another way to be saved from bots is to deactivate guests for shouting.
Main Forum: SMF 2.0.6
Co-Forum: SMF 2.0.6

mbirth

Quote from: piwaille on August 07, 2006, 05:27:57 PMI've just been spammed :(

Besides doing these changes mentioned by Kettu, you could also try the latest testing version as there are lots of new features including the htmlentities()-thing.


Quote from: piwaille on August 07, 2006, 05:27:57 PMPS: While I was writing... maybe one solution would be to put an other code for visitors (like CAPTCHA ) ?

Usual CAPTCHAs are easily breakable, as you can read on the Wikipedia-page. If the spam rate doesn't increase, I see no need for such things. But maybe I will implement something so that Guests aren't allowed to post links or BBCode at all.

Cheers,
  -mARKUS


NEVER contact me via ICQ/MSN/whatever for support inquiries unless I told you to do so! Use the forum threads instead.
Only send PMs if you need to tell me sensitive data.

MIKESS.COM

Can this mods be install on SMF 1.0.7 ?
Tandiono.com [nofollow] | Mikess.com [nofollow] | WebsiteForum.net [nofollow] | AudioForum.net [nofollow] | ToysForum.net [nofollow] | GadgetForum.net [nofollow] | ClickBankForum.net [nofollow] | ForumBoards.net [nofollow] | VerySoon.net [nofollow] | ClickBanks.net [nofollow]

Advertisement: