News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Ultimate Shoutbox

Started by Grudge, March 28, 2004, 09:11:20 AM

Previous topic - Next topic

9210

This is the 4th MOD i'd tried to install, but again, troubles.......It installs allright, but ONLY in the default theme....So now I'm stuck with empty fields in the settings page in the forum (Features and Options).......Why is this??? And how to solve it?

Alisha

You need to open the .mod file, and find files that are in the Theme/ directory. Open those files and make manual edits to those files as instructed in the .mod file...

Currently all packages will only modify the default templates. So if you have another theme you will need to modify it yourself.

Maybe someone else can explain this better for you.  If this is the FIRST time you have done this, it will be a little scary and overwhelming. But it is way easier than it looks at first.  Also, make a BACKUP of the file you are going to edit so if you mess up, and you will, you can start over.

If you need some help, I can try to help you some more.  Again in this mod you have to add the SSI function to where you want the shoutbox.

Grudge

Actually, on the shoutbox you needn't make any changes. 9210, would the empty fields be because you're using a different language that isn't english??

If you read this thread you'll find plenty of examples on how to get the shoutbox to show, it basically just requires you to add smfshout() to your template - it's mentioned so many times in this topic it's not funny :D
I'm only a half geek really...

9210

I changed the language to English and the options appeared. Tried to install it again, but for me, (a real PHP n00b), it's just too much of a hassle to get it working. Too much template changing etc, to afraid to ****** something up....Oh well....just got to live with it, I guess...... :'( :'(

Grudge

Shouldn't have tried to install it twice. Basically, the two things you needed to do are:

1) With it installed using ftp go into your forum directory then Themes/default/languages/Modifications.english.php and COPY this will to Modifications.language.php where language is the name of the langauge you are using. That will make the options always appear in your language.

2) In your theme, open up index.template.php, and add:
<div>' . smfshout() . '</div>

Somewhere in the file near where you think you want it. If doing that gives you an error change it to say:
echo '<div>' . smfshout() . '</div>';

Then you'll have to play with it to get the HTML to work, but it's a start.
I'm only a half geek really...

Alisha

Quote from: Alisha on January 18, 2005, 04:24:43 PM
I have a new idea here, is it possible to make the senders name the Color defined in the users group? Example on our site, Admins are a RED. I would like to make it where when a Admin posts something in the Shout their name would be that Red Color.

I would also like to change the color of the text somehow. I have an ideas for this;

First would alternate the text colors. Just two colors would be needed to kinda separate the texts. Alternative would be to Bold line 1 and NonBold on line 2. Alternating Bold/nonBold on each line.

Thanks for any help! :)

Thought I might ask again?? Maybe some place to start?

Champi

Fatal error: Call to undefined function: smfshout() in /home/champi.nl/smf/Sources/Load.php(1040) : eval()'d code on line 314

i got this message when installing shoutbox... i have installed 1.0.1... i put al files manual trough ftp atthe directories and run shoutdb.php...  ???


Alisha

Quote from: champi.nl on January 20, 2005, 09:30:02 PM
Fatal error: Call to undefined function: smfshout() in /home/champi.nl/smf/Sources/Load.php(1040) : eval()'d code on line 314

i got this message when installing shoutbox... i have installed 1.0.1... i put al files manual trough ftp atthe directories and run shoutdb.php...  ???



I had the same problem, its how you are using the shout function. All depends on where you are putting it in the code.

This worked well for me. Although, it might not work, so you will have to play with it to make it work.

        // Shout Box Start
        echo '
<tr>
<td class="catbg" colspan="2">"Shout Outs"</td>
        </tr><tr>
<td class="windowbg2" align="left" colspan="2"><span class="smalltext">', smfshout(), '</span></td>
        </tr>';

TedNigma

Installed it on 1.0.1..  nothing changed except for the admin..  There is a shout box variable drop down menu..  However, browsing the board, nothing that says 'Shout Box' from a user stand point..

Any help?  Or am I just a 'Dork Fish'?
-Blue Comedy Tour Rides Again-

Thanks,
LinuxMWB

Jerry

you need to add it to your theme manually. with ',smfshout(),' you can check this post for some examples... :)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

TedNigma

Quote from: Jerry on January 21, 2005, 02:47:33 AM
you need to add it to your theme manually. with ',smfshout(),' you can check this post for some examples... :)

Thanks..  I suppose I should RTFM before I ask a 'Dork Fish' question.  LOL.. 

I did not realize there was a variable involved.  The package manager said 'Pack installed successfully' so i just figured it would 'work'..  ROFL!!  I've been doing this long enough to realize that is never the case.   ;)

I DO love the software..  and the community is the best..

Champi

#191
"Shout Outs"
Fatal error: Call to undefined function: smfshout() in /home/champi.nl/smf/Sources/Load.php(1040) : eval()'d code on line 301 or

"Shout Outs"
Fatal error: Call to undefined function: smfshout() in /home/champi.nl/smf/Sources/Load.php(1040) : eval()'d code on line 326

at the place where i put it... i get this message.. are you sure that could be the only problem... i also made changes to default template.. i get the same error there....

also with default theme... anyone idea  ???

Alisha

Quote from: champi.nl on January 21, 2005, 07:07:44 AM
"Shout Outs"
Fatal error: Call to undefined function: smfshout() in /home/champi.nl/smf/Sources/Load.php(1040) : eval()'d code on line 301 or

"Shout Outs"
Fatal error: Call to undefined function: smfshout() in /home/champi.nl/smf/Sources/Load.php(1040) : eval()'d code on line 326

at the place where i put it... i get this message.. are you sure that could be the only problem... i also made changes to default template.. i get the same error there....

also with default theme... anyone idea  ???


I mentioned I am not sure about anything... Just a noob trying to help.  Can you post your Code where you have the  smfshout()  and the Function code from your SSI.PHP.  I do recall that it isn't an error in the load.php. That I am sure about! :)

BabyGz

Hello ppl...

How do you make the shoutbox auto refresh every 1 minute or so?..
Is that possible?.. or do you have to autorefresh the whole page?..
thanks

Alisha

#194
Quote from: BabyGz on January 21, 2005, 02:39:00 PM
Hello ppl...

How do you make the shoutbox auto refresh every 1 minute or so?..
Is that possible?.. or do you have to autorefresh the whole page?..
thanks

Its a function, so you would have to refresh the whole page.  Unless you wanted to put the Shoutbox in another empty file, set its refresh for 1 min, and add it to your forum page with a iframe or in-line code.  This I have not tried but I have seen it work on other sites, and I was told this is how you do it. 


Example:
include('/path/to/script/pages/shoutbox.html');

This is place the Shoutbox into the template, Now I am not sure if this will refresh or not.

<iframe src="http://www.yourdomain.com/phpfiles/shoutbox.html" name="frame1" scrolling="no" frameborder="no" align="center" height = "300px" width = "300px">
</iframe>


You'll need to adjust height/width to meet the size of the table you have generated. This should work on most HTML 4.0+ compliant browsers.

These are just same type codes, you will need to edit them to look right and show the refresh.   If they will not auto refresh, then I would add a little "Refresh" button into the Box on the Iframe option. then it will just refresh what is inside the frame.

Champi

i ve put the shoutbox at the bottom (between copyright and loadtime) ... i made changes in index.template.php....

around line 283:

// The main content should go here.  A table is used because IE 6 just can't handle a div.
   echo '
   <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
      <td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
}

function template_main_below()
{
   global $context, $settings, $options, $scripturl, $txt;

   echo '</td>
   </tr></table>';

// Show the "Powered by" and "Valid" logos, as well as the copyright.  Remember, the copyright must be somewhere!
   echo '

   <div id="footerarea" style="text-align: center; padding-bottom: 1ex;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
      <script language="JavaScript" type="text/javascript"><!--
         function smfFooterHighlight(element, value)
         {
            element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
         }
      // --></script>
      <table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
         <tr>
            <td valign="middle" align="center" style="white-space: nowrap;">
               ', theme_copyright(), '<br /><font size="1">
                   </font>
             </td>
         </tr>

      </table>';
// Show shoutbox!
<table>
<tr>
<td>
' , smfshout() , '
</td>
</tr>
</table>


// Show the load time?
   if ($context['show_load_time'])
      echo '
      <span class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

   echo '
      </div>';

What function, lines do you want to know of my ssi.php file....??

greetzz

Alisha

// Show shoutbox!
<table>
<tr>
<td>
' , smfshout() , '
</td>
</tr>
</table>


First thing I can see is there is NO echo ' statment.  If you are putting html into PHP you need to echo it.

        // Shout Box Start
        echo '
<tr>
<td class="catbg" colspan="2">"Shout Outs"</td>
        </tr><tr>
<td class="windowbg2" align="left" colspan="2"><span class="smalltext">', smfshout(), '</span></td>
        </tr>';


Also, you are placing a table inside of a table here, I am not sure of what skin you are using, but this might now look / work right.  I added mine under tha users online section.

At the bottom of your SSI.php you will see somthing like

function ssi_smfshout ($message_id = null, $output_method = 'echo')

Everything after that untill ';  This is the Function you are trying to call up in the template file.

Champi

#197
 
"Shout Outs"
Fatal error: Call to undefined function: smfshout() in /home/champi.nl/www/smf/Sources/Load.php(1040) : eval()'d code on line 300


i followed your advise with echo... was forgotten that... i am sorry...

i still got the same error message... perhaps something else went wrong...

i also do not see the specific rule in the ssi.php file.. i had to install everything manually.. do i also have to modify that file...add that rule? i am a little confused...  perhaps you can post me an example of the default template... and ssi file.. i can check then what the real problem is..

i use the black template...

thanx for your time..

Alisha

Check your .mod file:

<edit file>
SSI.php
</edit file>

<search for>
?>
</search for>

<add before>
function ssi_shout()
{
global $sourcedir;

include_once("$sourcedir/shout.php");
shout_display();
shout_form();
}
</add before>

<edit file>
ssi_examples.php
</edit file>

<search for>
<h3>Recent Calendar Events Function: &lt;?php ssi_recentEvents(); ?&gt;</h3>
<?php ssi_recentEvents(); ?>

<hr />
</search for>

<add after>
<h3>Shoutbox: &lt;?php ssi_shout(); ?&gt;</h3>
<?php ssi_shout(); ?>

<hr />
</add after>


If you didnt add this to the SSI.php then well that would explain a lot! lol

Here is my SSI.php entry:

function ssi_shout()
{
global $sourcedir;

include_once("$sourcedir/shout.php");
shout_display();
shout_form();
}


Maybe this will solve the problem! :)

Champi

you are right... i will give it a good try now... that package manager is confusing.....  better do everything manual...  ;)

Advertisement: