SimplePortal

Support => English Support => Topic started by: ddi on January 18, 2010, 03:08:23 PM

Title: Another way for shoutbox...
Post by: ddi on January 18, 2010, 03:08:23 PM
Look there: www.authorway.com/fora

You will see a tabbed menu at the top.

I would like to add the shoutbox there by creating a new function to the attached file...

Any help for doing that?

(i have tried the:

Code: [Select]
if (allowedTo('sp_admin'))
     echo 'No support for you!';
else
     sp_shoutbox(array('shoutbox' => 1), 0);

...but can't manage it to work).


Any ideas, pls?  :nervous-happy:
Title: Re: Another way for shoutbox...
Post by: [SiNaN] on January 20, 2010, 04:16:17 PM
array('shoutbox' => 1) part means you want to display the shoutbox with the id of 1. Did you create that shoutbox?

Also because of the 'if' statement, only admins will be able to see the shoutbox.
Title: Re: Another way for shoutbox...
Post by: ddi on January 21, 2010, 12:04:33 PM
Sinan, thanx for the reply.

Yes, I have created that shoutbox and yes, I know about the admin issue but this can be overidden if you have the same sb enabled somewhere else inside the forum.

I dont know the right syntax for the code that I must add in the file that I have attached...
Title: Re: Another way for shoutbox...
Post by: [SiNaN] on January 21, 2010, 12:07:11 PM
If you are using the mob_sb() function, this would be it:

Code: [Select]
function mot_sb()
{
sp_shoutbox(array('shoutbox' => 1), 0);
}

If you get an error, let me know what it is.
Title: Re: Another way for shoutbox...
Post by: ddi on January 21, 2010, 03:31:57 PM
It is working great but it shows at the bottom of all three tabs...

Somewhere must put a div and still dont know where...

chek on my first page: www.authorway.com/fora



Title: Re: Another way for shoutbox...
Post by: [SiNaN] on January 21, 2010, 03:37:17 PM
It seems like it is outside the last <div>. I wouldn't know exactly without seeing the code though.
Title: Re: Another way for shoutbox...
Post by: ddi on January 21, 2010, 03:40:59 PM
OK then, here is the code (attached).

And one more thing...

Look at the arrangement of the shouts when in this horizontal bloc...
Title: Re: Another way for shoutbox...
Post by: [SiNaN] on January 21, 2010, 03:45:40 PM
Change this function:

Code: [Select]
function mot_sb()
{
   sp_shoutbox(array('shoutbox' => 1), 0);

}

as this:

Code: [Select]
function mot_sb()
{
echo '

<div class="tabsmenucontent" style="padding: 5px">';

   sp_shoutbox(array('shoutbox' => 1), 0);

echo '

</div>';
}

About the alignment, I'm not sure about that. Some CSS class should be resetting the intended alignment.
Title: Re: Another way for shoutbox...
Post by: ddi on January 21, 2010, 03:53:44 PM
Code: [Select]
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/mysite/public_html/fora/tabbed_block_forum/mouseoverTabContent.php on line 1779
Title: Re: Another way for shoutbox...
Post by: [SiNaN] on January 21, 2010, 03:55:13 PM
I have updated the post, there was a typo. Can you try it again?
Title: Re: Another way for shoutbox...
Post by: ddi on January 21, 2010, 03:58:44 PM
Sinan, now it shows nothing at all. Just an empty tab.
Title: Re: Another way for shoutbox...
Post by: [SiNaN] on January 21, 2010, 04:03:43 PM
Hmmm, can you attach your file now?
Title: Re: Another way for shoutbox...
Post by: ddi on January 21, 2010, 04:05:54 PM
Sure. And thanx for your time . :nervous-happy:
Title: Re: Another way for shoutbox...
Post by: [SiNaN] on January 21, 2010, 04:11:28 PM
Okay. The empty area is mot_Statistics(); function. Since it is dependent on TP, it will echo an empty output. For shoutbox tab to be added, you should add it to the tab item list, here:

Code: [Select]
<div id="mytabsmenu" class="tabsmenuclass">
<ul>

<li><a href="#" rel="gotsubmenu[selected]">ΝΕΑ ΣΤΙΣ GALLERIES</a></li>
<li><a href="#" rel="gotsubmenu">ΝΕΑ ΘΕΜΑΤΑ</a></li>
<li><a href="#" rel="gotsubmenu">ΦΩΝΟΛΟΓΙΟΝ</a></li>

</ul>
</div>

It should be like:

Code: [Select]
<div id="mytabsmenu" class="tabsmenuclass">
<ul>

<li><a href="#" rel="gotsubmenu[selected]">ΝΕΑ ΣΤΙΣ GALLERIES</a></li>
<li><a href="#" rel="gotsubmenu">ΝΕΑ ΘΕΜΑΤΑ</a></li>
<li><a href="#" rel="gotsubmenu">ΦΩΝΟΛΟΓΙΟΝ</a></li>
<li><a href="#" rel="gotsubmenu">Shoutbox</a></li>

</ul>
</div>

But I'm not sure where that code is. That's all I can see through HTML source.
Title: Re: Another way for shoutbox...
Post by: ddi on January 21, 2010, 04:18:33 PM
Yes Sinan you are right! I had left the

Code: [Select]
mot_Statistics();
alive without the

Code: [Select]
//
See it in my first page. You are great!

Any ideas about the css thingy?
Title: Re: Another way for shoutbox...
Post by: [SiNaN] on January 21, 2010, 04:25:11 PM
Try this:

Themes/default/portal.css

Code: (Find) [Select]
.shoutbox_list_compact
{
margin: 0;
padding: 0;
list-style: none;
overflow: auto;
height: 200px;
}
.shoutbox_list_compact li
{
padding: 4px 0px 4px 4px;
border-bottom: 1px dashed #CCCCCC;
border-left: 3px solid #DADADA;
}

Code: (Replace) [Select]
.shoutbox_list_compact
{
margin: 0;
padding: 0;
list-style: none;
overflow: auto;
height: 200px;
float: none;
}
.shoutbox_list_compact li
{
padding: 4px 0px 4px 4px;
border-bottom: 1px dashed #CCCCCC;
border-left: 3px solid #DADADA;
float: none;
}
Title: Re: Another way for shoutbox...
Post by: ddi on January 21, 2010, 04:38:02 PM
Nothing changed...

Maybe the code that i use in a php block to call the tabs might help you...
Title: Re: Another way for shoutbox...
Post by: [SiNaN] on January 21, 2010, 04:40:10 PM
Well, try this then:

In your tabbed content block code:

Code: (Find) [Select]
.tabsmenucontentclass li{
float: left;
margin-right: 1em;
}

Code: (Replace) [Select]
.tabsmenucontentclass li{
float: left;
margin-right: 1em;
}
.shoutbox_list_compact li
{
float: none;
}
Title: Re: Another way for shoutbox...
Post by: ddi on January 21, 2010, 04:45:55 PM


It worked!  8)

Watch it in action in my first page.

Sinan, thank you very much for your time and efforts on helping me out with this one.

Excellent mod with a great support!

Title: Re: Another way for shoutbox...
Post by: [SiNaN] on January 22, 2010, 08:53:03 AM
Looks cool. Good work! I'm glad I could be of help. ;)
SimplePortal 2.3.8 © 2008-2024, SimplePortal