SimplePortal
Support => English Support => Topic started 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:
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:
-
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.
-
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...
-
If you are using the mob_sb() function, this would be it:
function mot_sb()
{
sp_shoutbox(array('shoutbox' => 1), 0);
}
If you get an error, let me know what it is.
-
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
-
It seems like it is outside the last <div>. I wouldn't know exactly without seeing the code though.
-
OK then, here is the code (attached).
And one more thing...
Look at the arrangement of the shouts when in this horizontal bloc...
-
Change this function:
function mot_sb()
{
sp_shoutbox(array('shoutbox' => 1), 0);
}
as this:
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.
-
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/mysite/public_html/fora/tabbed_block_forum/mouseoverTabContent.php on line 1779
-
I have updated the post, there was a typo. Can you try it again?
-
Sinan, now it shows nothing at all. Just an empty tab.
-
Hmmm, can you attach your file now?
-
Sure. And thanx for your time . :nervous-happy:
-
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:
<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:
<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.
-
Yes Sinan you are right! I had left the
mot_Statistics();
alive without the
//
See it in my first page. You are great!
Any ideas about the css thingy?
-
Try this:
Themes/default/portal.css
.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;
}
.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;
}
-
Nothing changed...
Maybe the code that i use in a php block to call the tabs might help you...
-
Well, try this then:
In your tabbed content block code:
.tabsmenucontentclass li{
float: left;
margin-right: 1em;
}
.tabsmenucontentclass li{
float: left;
margin-right: 1em;
}
.shoutbox_list_compact li
{
float: none;
}
-
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!
-
Looks cool. Good work! I'm glad I could be of help. ;)