Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Closed Thread
 
Thread Tools
Blinking Introduction Text Details »»
Blinking Introduction Text
Version: 1.00, by Velocd Velocd is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

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! ^^



---------------- Installation ----------------

1. In index.php, find:
PHP Code:
eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";"); 
Above it place:
PHP Code:
if($forum['forumid'] == 3// This number needs to be the id of your introduction forum.
           
{
             if(
$bbuserinfo[usergroupid] == && $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>&nbsp;-&nbsp;
<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.

Comments
  #12  
Old 08-13-2002, 02:17 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:

In index.php, find:
PHP Code:
           {
             if(
$bbuserinfo[usergroupid] == && $bbuserinfo[posts] == 0)
                {
                  eval(
"\$introtext .= \"".gettemplate("forumhome_introbit")."\";");
                  
$forum['title'] .= "$introtext";
                }
           } 
Replace it with:
PHP Code:
           {
             if(
$bbuserinfo[posts] < 10) {
             if (!
$check=$DB_site->query_first("SELECT postuserid FROM thread WHERE postuserid=$bbuserinfo[userid] AND forumid=3")) {
                  eval(
"\$introtext .= \"".gettemplate("forumhome_introbit")."\";");
                  
$forum['title'] .= "$introtext";
                }
             }
           } 
Now see where the forumid=3 is? Set this value to whatever your introduction forumid is.

And that is it. If you don't want it to check if the user has less than 10 posts, just comment out that if-statement.
  #13  
Old 02-16-2003, 02:45 PM
TranceMaster TranceMaster is offline
 
Join Date: Mar 2002
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

excellent man
just what i need
  #14  
Old 02-16-2003, 03:02 PM
EchoHype.com's Avatar
EchoHype.com EchoHype.com is offline
 
Join Date: Mar 2002
Location: Harrisburg, PA
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey velocd

very nice hack. useful and simple
  #15  
Old 03-15-2003, 02:02 PM
uomoragno uomoragno is offline
 
Join Date: Mar 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

small modification

In index.php, find:

PHP Code:
eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";"); 
Above it place:

PHP Code:
$announcementsforumid=$DB_site->query_first("SELECT value FROM setting WHERE varname='announcementsforumid'");
if (
$bbuserinfo['lastvisitdate']=='Never') {

if(
$forum['forumid'] == $announcementsforumid['value'] )                {
                  eval(
"\$introtext .= \"".gettemplate("forumhome_introbit")."\";");
                  
$forum['title'] .= "$introtext";
               }
            }  
            else {
        if ((
$fview get_bbarraycookie('forumview'$forum['forumid'])) > $bbuserinfo['lastvisit']) {
             
$userlastvisit=$fview;
      } else {
             
$userlastvisit=$bbuserinfo['lastvisit'];
             }
             if (
$userlastvisit<$forum['lastpost']) {
             if(
$forum['forumid'] ==  $announcementsforumid['value'] )                {
                  eval(
"\$introtext .= \"".gettemplate("forumhome_introbit")."\";");
                  
$forum['title'] .= "$introtext";
               }
           } else {
            
          }
        } 
and

PHP Code:
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')"); 
  #16  
Old 03-15-2003, 02:51 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What does that do uomoragno?

Also velocd - this hack was never added to the db ?

- miSt
  #17  
Old 03-15-2003, 03:11 PM
jbear6 jbear6 is offline
 
Join Date: Oct 2001
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice Hack! Would there be a way to call the members name in the flashing text? Something like: "c'mon {username} introduce yourself!"?

Thaks
Jbear6
  #18  
Old 03-15-2003, 06:24 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$bbuserinfo[username] would call the member's name
  #19  
Old 03-15-2003, 06:57 PM
Xanthine Xanthine is offline
 
Join Date: Mar 2002
Posts: 232
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I keep getting a php error when adding the first block of code. hmmm
  #20  
Old 06-26-2003, 03:53 AM
Splitfyre Splitfyre is offline
 
Join Date: Dec 2001
Location: Vancouver, BC Canada
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great
  #21  
Old 06-26-2003, 10:26 AM
Bulleh Bulleh is offline
 
Join Date: May 2003
Location: Leicester
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nothing happens for me
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06565 seconds
  • Memory Usage 2,339KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (9)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete