WordPress.org

Forums

Pierre's Wordspew
How to give your users a choice for size of your chat box. (3 posts)

  1. Tosh
    Member
    Posted 4 years ago #

    Just thought I'd share this trick. I'll post this on my blog as well later. Put this in your wordspew.php file around line 636 if ($level_for_archive==1) {

    echo '<div style="text-align:right;"><a href="'.$Actual_URL.'/wp-content/plugins/pierres-wordspew/wordspew_archive.php" onmouseover="ChangeURL(\'shoutboxArchive\',\''.$Actual_URL.'/wp-content/plugins/pierres-wordspew/wordspew_archive.php\',\'?shout_cat=\')" id="shoutboxArchive">'.__("Archive",wordspew).'</a> | ';
    		?>
    		<a style="cursor: pointer;" onClick="document.getElementById('chatoutput').style.height='400px'"">+</a>
    		<a style="cursor: pointer;" onClick="document.getElementById('chatoutput').style.height='200px'"">-</a>
    		<?php
    		echo '</div>';
  2. Pierre_02
    Member
    Plugin Author

    Posted 4 years ago #

    Hi xberserker,

    fun :) and what do you think about this ;) ?

    echo '<div style="text-align:right;"><a href="'.$Actual_URL.'/wp-content/plugins/pierres-wordspew/wordspew_archive.php" onmouseover="ChangeURL(\'shoutboxArchive\',\''.$Actual_URL.'/wp-content/plugins/pierres-wordspew/wordspew_archive.php\',\'?shout_cat=\')" id="shoutboxArchive">'.__("Archive",wordspew).'</a> |';
    	?>
    		<a style="cursor: pointer;" onClick="var obj=document.getElementById('chatoutput');obj.style.height=(obj.offsetHeight+20)+'px';">+</a>
    		<a style="cursor: pointer;" onClick="var obj=document.getElementById('chatoutput');hauteur=(obj.offsetHeight-48);if(parseInt(hauteur)>0)obj.style.height=hauteur+'px';">-</a>
    		<?php
    		echo '</div>';

    BTW users can "truly" adapt the height of the shoutbox.

    If you want to code a little more (combining javascript and php), by playing with cookies you'll can keep the height settings per user ;).

    Amicably,

    Pierre.

  3. Tosh
    Member
    Posted 4 years ago #

    Pretty cool, I'll see what my users think of it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Pierre's Wordspew
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic