News:

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

Main Menu

nneonneo's Shoutbox

Started by nneonneo, December 26, 2006, 06:58:11 PM

Previous topic - Next topic

PipeRain


RobXduffy

Quote from: nneonneo on February 05, 2008, 05:27:01 PM
Find
// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />

After the // YSHOUT HERE line, add
$loadit = true;
if(loadMemberData(Array($context['user']['id']),false,'profile')!==false)
{
global $user_profile;
$membergroups=explode(',', $user_profile[$context['user']['id']]['additionalGroups']);
$membergroups[]=$user_profile[$context['user']['id']]['ID_GROUP'];
$membergroups[]=$user_profile[$context['user']['id']]['ID_POSTGROUP'];
if (count(array_intersect(array(3,4), $membergroups)) > 0)
$loadit=false;
}
else $loadit=false;
if($loadit)

where 3,4 are the membergroups not allowed to see it.

Ok i put the line of code, but now admins can't see it. Maybe i put wrong membergroup numbers in? How can i find out membergroup numbers.

thanks for your time nneonneo 

nneonneo

It works for me. The member group numbers are the ones shown in the URL when you edit them:
index.php?action=membergroups;sa=members;group=6
In that URL, 6 is the group ID you need to put there.
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!

active999

Hello and congratulations for the very nice mod

I have a question.  My forum is very slow when the user uses Internet Explorer (v7 for sure, I don't know about previous versions).  I think that the reason is the shoutbox.  When I take it off the page loading time is much shorter.  With Firefox there is no problem at all.

Is that an issue that you have come across before?  What should I check?

Thank you in advance

nneonneo

This is an issue I have run across before.

I promised to release an update for it a few weeks back, but I have been so busy, I have not been able to fully test this version as of yet.

I have attached the mod below. I do not have the resources at this time to fully verify everything, but I have tested it to the extent that I can this week.

Changes:
* Added the option to set certain membergroups as moderators of the shoutbox.
* Made the shoutbox use usergroup colors by default
* One more fix for stubborn "...loading shoutbox..." problems. I've tested this on a number of configurations, and I think it should work for everyone properly now.
* Fix to prevent long page loads on IE 7. Basically, on any page load request, the shoutbox aborts the current connection, using an IE-7 specific detection of that. It's a serious kludge, but it does resolve the lag on IE 7.

If you simply download this and apply the update, the changes should take effect immediately, though you may need to refresh the page to get the new JavaScript code.
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!

dmz_pt

#1585
SB_1.12.tgz installed sucessfully (first time instalation)

"...loading shoutbox..." problems continues.

Try to solve the problem with previous tips given in this topic, but can not solve it.

nneonneo

Huh. What's your forum address?
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!

dmz_pt


nneonneo

Somehow, one of my files got truncated, and since that didn't happen to my development copy, I didn't catch that.

A corrected version is attached. The only file that has been modified is yshout/js/prototype.js, which is attached too. Just replace the existing prototype with this one, and it should work correctly.

Sorry about the trouble!
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!

pipo_il_primero

If I don't want this shoutbox to appear in SMF but want it to appear on my website, how can I call it?
Thanks!

great job by the way!

nneonneo

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!

active999

nneonneo thank you very much for your quick answer.  I have installed the new version and still testing to see if things are ok.  First impression is that it is better but still IE is a lot slower than Firefox when loading the pages that include the shoutbox.


nneonneo

Works for me; what's your forum URL? I will check it out when I have the time.
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!

dmz_pt

The new 1.12 version works pretty fine.
Will continue testing it.
thanks

active999

Quote from: nneonneo on February 13, 2008, 04:03:07 PM
Works for me; what's your forum URL? I will check it out when I have the time.

We are now in the process of upgrading the look.  The normal forum is hxxp:www.modelteam.gr [nonactive] and the test forum where all the new features are installed is hxxp:www.modelteam.com.gr [nonactive]

The normal forum still has v1.11 and I have installed v1.12 on the test forum.  Oh, and one little detail.  I am from Greece, so everything is based on the greek language :)

nneonneo

A side note: the text is missing, so you might want to consider installing the greek language pack.

Direct link:
http://www.simplemachines.org/community/index.php?action=dlattach;topic=137508.0;attach=47088
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

OK, I think that I may know the problem, but I cannot tell for sure.

Change the 2000 in setTimeout("schedRefresh()",2000); to something higher; 5000 should work (this is in yshout/js/yshout.js). Refresh the page (force-refresh if necessary) and see if that helps.

I should also add that unless someone knows of an event that fires when you refresh the page in Internet Explorer 7, I cannot fix the lag associated with refreshing the page, or using navigation buttons. Hopefully, this is relatively uncommon. AFAIK the onunload handler only fires when IE is just about to leave the page.
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!

pipo_il_primero

Quote from: nneonneo on February 13, 2008, 02:26:00 PM
See http://www.simplemachines.org/community/index.php?topic=137508.msg1195341#msg1195341 for an implementation of this.

thanks a lot!
will try it ASAP

ps: active999 I like the theme of your smf forum, where did you get it?

pipo_il_primero

OK I've tried it, it is working but I have now a design problem.
When I put the sbox in the forum template it is appearing just fine.
However, with the coding in the website main page it is not keeping the format, names and posts are wrapping instead of appearing neatly one below the other...
I've put the code in a table, it helped, but the wrapping is still there.
How can I solve this? Maybe by taking out the "Today at..." part? How can I do this anyway?
Thanks for the support!

nneonneo

How wide is the space allotted to the shoutbox? If it's not enough, then things will have to wrap. If it's wrapping with a lot of space to spare, then something is broken in the CSS.

Try overflow: auto or overflow: scroll (this is in index.template.php, under #yshout { CSS block)
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!

Advertisement: