News:

Wondering if this will always be free?  See why free is better.

Main Menu

nneonneo's Shoutbox

Started by nneonneo, December 26, 2006, 06:58:11 PM

Previous topic - Next topic

NascarFan

I'm having massive problems to add the smileysbar.
Where exactly do i have to add the following code?

<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>'; require('mymod/smiley.php'); loadSmileys(); echo ' <div id="smiley_pic">'; printSmileys('shout_form','shout_text'); echo ' </div> <script type="text/javascript"> //Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] ) var collapse1=new animatedcollapse("smiley_pic", 1000, false) </script> </div>

I cant get that to work. I always get the following error:

Quote

Parse error: syntax error, unexpected '<' in .../Themes/blueglass/index.template.php on line 751
747:                                                                                     
748:                                                 
749:    // YSHOUT END
750:
751: <div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';                     require('mymod/smiley.php');                     loadSmileys();                  echo '                     <div id="smiley_pic">';                        printSmileys('shout_form','shout_text');                  echo '                     </div>                     <script type="text/javascript">                     //Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )                     var collapse1=new animatedcollapse("smiley_pic", 1000, false)                     </script>                  </div>
752:
753:
...

Kjeldor

I install this mod in my board, and is ...loading shoutbox... all time.

I know that the problem is de "board_url" becouse i'm using a subdomain "foro.elsantuario.es" (when i use "elsantuario.es/foro" is all ok). What can i put in the board_url in order to correct the problem?.

thanks a lot, great mod!.

Daggers

#2102

@Nascarfan:  The actual code to search for is this one...




echo '
<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>



You then add the smiley code so it looks like this....




// YSHOUT HERE
echo '
<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div><div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>'; require('mymod/smiley.php'); loadSmileys(); echo ' <div id="smiley_pic">'; printSmileys('shout_form','shout_text'); echo ' </div> <script type="text/javascript"> Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] ) var collapse1=new animatedcollapse("smiley_pic", 1000, false) </script> </div>';

       
        // YSHOUT END



Hope that helps :)


nneonneo

@Daggers: See this code in step 4?
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>

This is where collapse1 is defined. If it's missing or changed, then it will say collapse1 is undefined.

@Kjeldor: Since you are using SEO URLs, the URL http://foro.elsantuario.es/yshout/yshout.php redirects back to the main forum page! This would certainly make the shoutbox not work. So, you need to disable search-engine URLs.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

Daggers

nneonneo, got that mate...





// YSHOUT HERE
echo '
<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div><div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>'; require('mymod/smiley.php'); loadSmileys(); echo ' <div id="smiley_pic">'; printSmileys('shout_form','shout_text'); echo ' </div> <script type="text/javascript"> //Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] ) var collapse1=new animatedcollapse("smiley_pic", 1000, false) </script> </div>';

       
        // YSHOUT END



But still it says undefined :(

nneonneo

All on one line? That won't work, the comment will make it invisible...
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

Daggers

Quote from: nneonneo on April 26, 2008, 03:44:23 PM
All on one line? That won't work, the comment will make it invisible...

Please advise

nneonneo

How did all the code end up on one line?

Daggers (and NascarFan), it should be
// YSHOUT HERE
echo '
<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
// YSHOUT END
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

Daggers

Quote from: nneonneo on April 26, 2008, 05:21:46 PM
How did all the code end up on one line?


He did it ------->
;)


I have entered all of the above on seperate lines and it still does not work. It now says..

collapse1 is null or not an object

:(


nneonneo

Did you put
<script type="text/javascript" language="JavaScript" src="',$boardurl,'/mymod/animatedcollapse.js"></script> in the header?
If it still doesn't work, post/PM a board URL and I'll take a look.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

BaoUnit

So.. This is messing with the user's actions on the "Who's Online List," it always has users as viewing the board index, is there a way to fix this?

nneonneo

I don't know -- I'm not sure where the online info is set. Presumably, this is happening because the shoutbox loads some file, which eventually sets the online info (incorrectly), but I'm not sure how I can fix it :-\
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

Kjeldor

Quote from: nneonneo on April 26, 2008, 01:38:19 PM
@Kjeldor: Since you are using SEO URLs, the URL hxxp:foro.elsantuario.es/yshout/yshout.php [nonactive] redirects back to the main forum page! This would certainly make the shoutbox not work. So, you need to disable search-engine URLs.

Your work running on another website, thanks ;)

W. Riker

#2113
I installed this shoutbox but I can't find in admin panel place where I could modify shoutbox.

In attachment you can also see that the place for shoutbox was created but there is no place where to write in shout.



W. Riker

Also I didn't say that I'm using croatian language, and default theme. ;)

nneonneo

@W. Riker: There's no admin panel; settings are changed by editing the file yshout/yshout.php, and a few changed in yshout/js/yshout.js. Some text seems to be missing, so you should probably copy Themes/default/languages/Modifications.english.php to Modifications.croatian.php.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

W. Riker

#2116
OK.

Now it is there text ...loading shoutbox... and just stay all the time.

I one more thing... I wish that guests can not shout.  :D

W. Riker

#2117
I fixed this problem with loading shoutbox. ;)


Now I'm just interested in two things...

1) Is it possible to make that guests on forum don't see (and can't use shout)? And what should I do to make so?

2) How could I make that the newest shout goes to the top, and not to the bottom?

Thanks!  O:)

nneonneo

Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

W. Riker

Thanks a lot.   O:)

Now everything works just fine.  8)

Advertisement: