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

nneonneo

@NejiPooshon: If you are referring to removing images, I posted about it a few pages back. However, 1.20 will have this feature built-in, so you may wish to wait a bit until I release it :)

@trekkie2444: What does your index.template.php look like? Attach it and I will 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!

trekkie2444


nneonneo

[announce] Version 1.20 posted after several months of development.

Highlight of changes:
Instant-on capability for quick loading
IE7 lag fixed
Multiple bugfixes for ...loading shoutbox... issues; the majority of these should be solved
Settings and documentation moved to a separate files
Permissions implemented as SMF membergroup permissions (i.e. through the Admin CP)
Full XHTML-compliance
Backend changes to make modifying and enhancing the shoutbox easier
Changed /yshout/ to act as a standalone shoutbox (added yshout/index.php)
Added a warning for missing language files to alleviate problems with foreign boards
Many miscellaneous fixes
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!

nneonneo

@trekkie2444:
// YSHOUT HERE global $boardurl; echo ' <script src="',$boardurl,'/yshout/js/prototype.js" type="text/javascript"></script> <script src="',$boardurl,'/yshout/js/moo.ajax.js" type="text/javascript"></script> <script src="',$boardurl,'/yshout/js/behaviour.js" ...
// YSHOUT HERE echo ' <br />...
Your code all ended up on one line; you'll need to redo the modifications, since that has damaged the code. (for the tenth time, why does this happen?)
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!

Tricks

Ok i have a problem, firstly i uninstalled the old version of the Ajax shoutbox and manually installed the new one, problem is when i try to upload the new files into 'yshout' it wont allow me due to the owner being 99 which is weird, iv tried to remove 'yshout' altogether but that wont work at all, it seems to be stuck on my server and wont budge at all!

How can i remove the folder and its contents?

edi67

#2745
Quote from: nneonneo on June 26, 2008, 11:55:48 AM
@edi67: I believe that version 1.20 should have the options you want to make that happen -- sit tight for it :)

Installed new version nneo thx but where i can find this option?

and also i forgot how reverse the view of message i want that last messages come for first and not for last.
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

++STi++

How can I change the shoutbox code so that only logged in users can post? Right now, guests can make up any name and shout with it. Thanks!

p.s. I apologize if this has already been addressed. I tried searching this topic but couldn't find an answer

nneonneo

@Tricks: It happened to me too. Use CPanel to "fix file ownership" and "fix file permissions"; then the folder will be removable.

@edi67: yshout/settings.php: $reverseShouts and $shoutFormOnTop are the settings I think you were asking for.

@++STi++: For versions 1.16 and below, use $allowGuests in yshout/yshout.php; for version 1.20, use SMF's Permission system ("Post in Shoutbox" permission).
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!

edi67

Quote from: nneonneo on June 27, 2008, 11:27:52 AM
@edi67: yshout/settings.php: $reverseShouts and $shoutFormOnTop are the settings I think you were asking for.

Fantastic everything is ok superb work nneonneo :)
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

LinK187

I just uninstalled 1.15 on my test forum (smf 1.1.5), and tried to install 1.20. When I upload to the packages folder it does show up in the packages section in the admin menu. However when I click apply mod, It just times out.

trekkie2444

What code do I need to change?

[unplugged]

@trekkie

Attached is your index.template.php with the code corrected.

Now I am off to try out v1.20!!  :D
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



nneonneo

@LinK187: Odd. Check the forum error log, and make sure you delete the yshout folder if it still there.

@SunKing: Can you please check AdvSB_1.20 to make sure I didn't make any omissions when copying over the changes? Thanks :)
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!

[unplugged]

OK. I just took AdvSB_1.20 for a spin.

The "instant-on" is absolutely brilliant! Great improvement!
SMF permissions....perfect! Much easier to set who shouts and who doesn't.
In fact....the whole thing is much nicer now. Fast, no lag (even in IE  ;)), no problems at all installing in SMF 2.0 Beta 3.1 clean install.

A few **minor** oops's:

Shoutbox commands are incomplete. They start about halfway through the emotes description.
Regular members and guests only see the last few words of the emotes description.  :P

In FF2 and in Opera 9.5, the sound seems to randomly play about every 5 second up to several minutes in between. IE7 and IE8 didn't appear to have this glitch.

IE8 tends to throw the member back to the "top" of the shoutbox window where as the shouts are at the bottom. But IE8 is still beta anyway (just figured I'd throw you a heads up).

And that's it. Like I said.......minor.

Fantastic job on this mod, my hat's off to you. And thanks again for all of your patience, hard work, and willingness to support your mod.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



nneonneo

#2754
Thanks very much for checking those out!

Turns out I had a little typo (missing " in a div :-\) in AdvSB affecting the help files; it doesn't affect the regular shoutbox (but I accidentally re-uploaded it too...)

As for the sound glitch, I can't get it to reproduce consistently, and it entirely disappears when I try to debug it! I will have to investigate it further, but thanks for pointing it out.

Finally, I don't have the IE8 beta, but I bet it is a change in how they handle the scroll events or something :P Maybe the original authors of the autoscroll can fix it for IE8.



Anyone who wants to fix the help bug in AdvSB can do the following:
edit yshout/yshout.php and replace
<div style="border:1px solid #aaaaaa;>
by
<div style="border:1px solid #aaaaaa;">
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!

SA™

Quote from: nneonneo on January 19, 2008, 11:01:07 AM
I'm reposting pongsak's smiley guide because the recent server crash has deleted the smiley.php attachment.

Quote from: pongsak on August 18, 2007, 11:10:08 PM
For adding smiley .Let's go.
1. Adding 1 line of script between <head> and </head> index.template.php  .


<script type="text/javascript" language="JavaScript" src="',$boardurl,'/mymod/animatedcollapse.js"></script>


This file will create sliding effect.

2. Create "mymod" dir in root forum dir and copy these code and safe as "animatedcollapse.js"

//Animated Collapsible DIV- Author: Dynamic Drive (http://www.dynamicdrive.com)
//Last updated June 27th, 07'. Added ability for a DIV to be initially expanded.

var uniquepageid=window.location.href.replace("http://"+window.location.hostname, "").replace(/^\//, "") //get current page path and name, used to uniquely identify this page for persistence feature

function animatedcollapse(divId, animatetime, persistexpand, initstate){
this.divId=divId
this.divObj=document.getElementById(divId)
this.divObj.style.overflow="hidden"
this.timelength=animatetime
this.initstate=(typeof initstate!="undefined" && initstate=="block")? "block" : "contract"
this.isExpanded=animatedcollapse.getCookie(uniquepageid+"-"+divId) //"yes" or "no", based on cookie value
this.contentheight=parseInt(this.divObj.style.height)
var thisobj=this
if (isNaN(this.contentheight)){ //if no CSS "height" attribute explicitly defined, get DIV's height on window.load
animatedcollapse.dotask(window, function(){thisobj._getheight(persistexpand)}, "load")
if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes") //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
this.divObj.style.visibility="hidden" //hide content (versus collapse) until we can get its height
}
else if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes") //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
this.divObj.style.height=0 //just collapse content if CSS "height" attribute available
if (persistexpand)
animatedcollapse.dotask(window, function(){animatedcollapse.setCookie(uniquepageid+"-"+thisobj.divId, thisobj.isExpanded)}, "unload")
}

animatedcollapse.prototype._getheight=function(persistexpand){
this.contentheight=this.divObj.offsetHeight
if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes"){ //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
this.divObj.style.height=0 //collapse content
this.divObj.style.visibility="visible"
}
else //else if persistence is enabled AND this content should be expanded, define its CSS height value so slideup() has something to work with
this.divObj.style.height=this.contentheight+"px"
}


animatedcollapse.prototype._slideengine=function(direction){
var elapsed=new Date().getTime()-this.startTime //get time animation has run
var thisobj=this
if (elapsed<this.timelength){ //if time run is less than specified length
var distancepercent=(direction=="down")? animatedcollapse.curveincrement(elapsed/this.timelength) : 1-animatedcollapse.curveincrement(elapsed/this.timelength)
this.divObj.style.height=distancepercent * this.contentheight +"px"
this.runtimer=setTimeout(function(){thisobj._slideengine(direction)}, 10)
}
else{ //if animation finished
this.divObj.style.height=(direction=="down")? this.contentheight+"px" : 0
this.isExpanded=(direction=="down")? "yes" : "no" //remember whether content is expanded or not
this.runtimer=null
}
}


animatedcollapse.prototype.slidedown=function(){
if (typeof this.runtimer=="undefined" || this.runtimer==null){ //if animation isn't already running or has stopped running
if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
alert("Please wait until document has fully loaded then click again")
else if (parseInt(this.divObj.style.height)==0){ //if content is collapsed
this.startTime=new Date().getTime() //Set animation start time
this._slideengine("down")
}
}
}

animatedcollapse.prototype.slideup=function(){
if (typeof this.runtimer=="undefined" || this.runtimer==null){ //if animation isn't already running or has stopped running
if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
alert("Please wait until document has fully loaded then click again")
else if (parseInt(this.divObj.style.height)==this.contentheight){ //if content is expanded
this.startTime=new Date().getTime()
this._slideengine("up")
}
}
}

animatedcollapse.prototype.slideit=function(){
if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
alert("Please wait until document has fully loaded then click again")
else if (parseInt(this.divObj.style.height)==0)
this.slidedown()
else if (parseInt(this.divObj.style.height)==this.contentheight)
this.slideup()
}

// -------------------------------------------------------------------
// A few utility functions below:
// -------------------------------------------------------------------

animatedcollapse.curveincrement=function(percent){
return (1-Math.cos(percent*Math.PI)) / 2 //return cos curve based value from a percentage input
}


animatedcollapse.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
if (target.addEventListener)
target.addEventListener(tasktype, functionref, false)
else if (target.attachEvent)
target.attachEvent(tasktype, functionref)
}

animatedcollapse.getCookie=function(Name){
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}

animatedcollapse.setCookie=function(name, value, days){
if (typeof days!="undefined"){ //if set persistent cookie
var expireDate = new Date()
var expstring=expireDate.setDate(expireDate.getDate()+days)
document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()
}
else //else if this is a session only cookie
document.cookie = name+"="+value
}


3. download smiley.php and safe in mymod dir.

4. Search after in index.template.php or boardindex.template.php depend on where u put shout box.

<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>
or
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
or
<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>


   add

<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>


5. Open yshout.php for namely some input.

find and replace (up to 4 times)

*id="shout-form"

with

*id="shout-form" name="shout_form"

find and replace (up to 4 times)

*id="shout-text"

with

*id="shout-text" name="shout_text"

That's it.  :D



EDIT [Feb 4 2008]: Updated a few instructions. Changes are noted in red, changes to code marked with a red *.
EDIT [June 22 2008]: Clarified instructions.
EDIT [June 27 2008]: Add 1.20 instructions.


ive aaded this to my site the shout box works good so i fault ill add the smilys but it seem its for smf 11 not smf 2.0
is there any chance someone can update the smily.php please
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

[unplugged]

I use the smiley mod with no problems on SMF 2.0 as you can see here.

What is cuasing you to not be able to use the smileys?
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



SA™

i just get this

Open Smiley | Close
Fatal error: Call to undefined function db_query() in C:\*****\htdocs\forum\mymod\smiley.php on line 55
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

SA™

ok waht code do you use for smilys can i have you code please
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

[unplugged]

It shouldn't have the db_query() for sure. Let's see.
I'll just attach my smiley.php. That would be the easiest.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Advertisement: