Version: 1.00, by Velocd
Developer Last Online: Nov 2023
Version: 2.2.x
Rating:
Released: 07-20-2002
Last Update: Never
Installs: 6
No support by the author.
File edits: 1 (index.php) New templates: 1 Install time: 4 minutes Demo or Screentshot: Yes, see attachment.
The following is a small hack I compiled pretty quick, but I'm sure it'll be a great help for new members of your forum. This hack may only appeal to those using an introduction forum, so you may or may not need this. Although, this code could be manipulated in numerous other ways to bring your forum home page other cool tricks.
What does Velocds' hack do?
Assuming you have an introduction forum, new members with a post count of zero will see a blinking text message next to the title of your intro forum. Only registered members will also see this text.
The reason I needed this hack is because the first post I would prefer by a member to make is their introduction, so other members get to know alittle more about them. I have also had some members post their introduction in the wrong forum. This hack will hopefully guide them to the correct forum.
Known bugs:
When tested with Mozilla, the javascript blinking text did not work. You can still see the link, but it wont blink.
The text you use should not be very long, or else it will get "word wrapped" around below the forum title. If you know how to make it so more characters are available, let me know!
A more improved version from Velocd:
Ok, I don't know how to do this that is why I'm asking you guys. A more improved version of this hack would be to check whether or not that user has made an introduction thread yet, not whether they are past their zero post count. Although checking if they have a post count might also help, since not all members may want to make an introduction thread. If you know how to do this please let me know so I can update the hack! ^^
if($forum['forumid'] == 3) // This number needs to be the id of your introduction forum.
{
if($bbuserinfo[usergroupid] == 2 && $bbuserinfo[posts] == 0)
{
eval("\$introtext .= \"".gettemplate("forumhome_introbit")."\";");
$forum['title'] .= "$introtext";
}
}
Where the number 3 is, you have to change this to the id of your introduction forum, as it states in comments.
2. Find the following:
PHP Code:
$templatesused = '
And replace it with:
PHP Code:
$templatesused = 'forumhome_introbit,
3. Create a new template: forumhome_introbit
Code:
<script language="JavaScript"> <!-- Script from Nakkid blinking PM -->
window.onerror=null;
var bName=navigator.appName;
var bVer=parseInt(navigator.appVersion);
var NS4=(bName=='Netscape' && bVer>=4);
var IE4=(bName=='Microsoft Internet Explorer' && bVer>=4);
var i=0;
// blinking text speed (change it to suit your taste)
var blinkspeed=700;
if (NS4||IE4) {
if (navigator.appName=='Netscape') {
layerStyleRef='layer.';
layerRef='document.layers';
styleSwitch='';
} else {
layerStyleRef='layer.style.';
layerRef='document.all';
styleSwitch='.style';
}
}
function blink(layerName) {
if (NS4||IE4) {
if(i%2==0) {
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
} else {
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
}
}
if(i<1) {
i++;
} else {
i--;
}
setTimeout("blink('"+layerName+"')",blinkspeed);
}
</script>
</a><smallfont> -
<a href="newthread.php?s=$session[sessionhash]&action=newthread&forumid=$forum[forumid]" id="intro">
make an intro now!</a>
<script language="javascript">blink('intro');</script>
</smallfont>
And that is it
Thnx go to Nakkid since I used that javascript blinking text code from your header PM's. If there is a blinking text script that works with Mozilla, let me know
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Fixing bugs on my forum today I ran across this hack again and realized I could easily make it check to see if the user has a post made in the introduction thread.
----------------------------------
Assuming you have this hack installed already, and you want it to blink the introduction text UNTIL a member has made a thread in teh intro area, OR has below 10 posts (since sometimes they might now want to make a intro-thread), do this:
$announcementsforumid=$DB_site->query_first("SELECT value FROM setting WHERE varname='announcementsforumid'");
if ($bbuserinfo['lastvisitdate']=='Never') {
INSERT INTO setting (settinggroupid,title,varname,value,description,optioncode,displayorder)
VALUES ('5','Blinking Tex Forum Id','Blinkforumid','',
'Which forum do you want to use a Blinking Text? Fill in the forumid, please.','','14')");