Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Custom Invitation Message, w/Search Engine, Terms Details »»
Custom Invitation Message, w/Search Engine, Terms
Version: 1.00, by tgreer tgreer is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 04-07-2006 Last Update: Never Installs: 13
Uses Plugins Template Edits
 
No support by the author.

This is a PRODUCT: go to Manage Products, upload, to install.

This Product creates a "Welcome" or "Invitation to Join" table for guests. If the guest reaches your site via a search engine, the message will display the search engine name and the search terms to entice them to join.

It works with Google, Yahoo!, MSN, and a couple of others.

Members don't see the message: only guests.

The message will replace the "Posting Rules" - I never saw much need for guests to see the Posting Rules, after all. Members will still see the normal Posting Rules. This means that FORUMDISPLAY and SHOWTHREAD will display the invitation table.

I chose this location because it is at the bottom of the page, and that's where most interested guests will find themselves.

The plugin creates three new phrases:

TGREER_invite_title : the tile to display for the table/panel. Defaults to "You're Invited".

TGREER_invite_search_engine: An invitation to join, using the search engine name, search terms, and forum title.

TGREER_invite_default: if a guest is browsing the forum, but didn't arrive via search engine, they'll see a default invitation.

You MUST EDIT THESE PHRASES, as they contain the phrase "GENERIC industry". You'll need something more suited to your own forum.

The phrases use phrase variables:

{1} = the forum title
{2} = search engine name
{3} = search terms

The plugin creates one new template:

invite_forumrules

This template is used to create the actual HTML table which displays the invitation. You may edit it, as you would any other template. Within the template, there is a conditional to test if the user is a guest or not.

The variable $GLOBALS[orig_forumrules] contains the normal forumrules template. If you edit the invite_forumrules template, you can use this variable as a "placeholder" for the normal Posting Rules.

Advanced Users

You don't have to use my template or location. You can use the search terms and search engine anywhere you like. If you don't want to use my template, disable the TGREER_invite_template plugin.

In the TGREER_invite_search_terms plugin, comment-out these two lines:

PHP Code:
eval('$orig_forumrules = "' fetch_template('forumrules') . '";'); 
found near the top, and

PHP Code:
$vbulletin->templatecache['forumrules'] = $vbulletin->templatecache['invite_forumrules'];]]> 
found at the bottom.

Then, you can use $GLOBALS[search_engine], $GLOBALS[search_terms] and $GLOBALS[showSearchWelcome] wherever you like.

NOTE: $GLOBALS[showSearchWelcome] is "true" if the user reached the site via search engine, false otherwise.

Screen-shot:

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-08-2006, 03:58 AM
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Location: Google Kansas
Posts: 4,678
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so I can just place

$GLOBALS[search_engine]
$GLOBALS[search_terms]
$GLOBALS[showSearchWelcome]


where I want it to show if I chose to edit it ?

great mod, I like it
[high]* Brandon Sheley clicked install[/high]
Reply With Quote
  #3  
Old 04-08-2006, 09:41 AM
AMFMaree AMFMaree is offline
 
Join Date: Mar 2006
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi.. I just uploaded this but I can not see it working???
Reply With Quote
  #4  
Old 04-08-2006, 09:43 AM
AMFMaree AMFMaree is offline
 
Join Date: Mar 2006
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, its working.. I was looking for it on the Forum home page!..
Is there anyway to have it under the navbar on all pages..including the forumhome?

My brain isnt working.. I can not seem to find how to edit the actual message.

this is what i ahve..

Quote:
You're Invited!
Among My Friends discusses many topics of interest to the GENERIC industry. Please join our community today. Registration is free and easy. Don't just browse, participate!
I love it except.. to the generic industry I want to edit that
Im i missing something or can you walk me through it..
thanks
Reply With Quote
  #5  
Old 04-08-2006, 11:01 AM
AMFMaree AMFMaree is offline
 
Join Date: Mar 2006
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

me again..
All fixed.. just need to know how to center it. Thanks
Reply With Quote
  #6  
Old 04-08-2006, 12:04 PM
tgreer tgreer is offline
 
Join Date: Oct 2005
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Loco.M: yes, essentially. You can check to see if showSearchWelcome is true, and if it is, you'll have values for the other two you can use as you like.

@AMFMaree: There is already a very good mod for that, called "Welcome Headers". I use it on my site. Consider mine an additional mod, a "Welcome Footer" if you like, designed to catch the eye of those who end up at the bottom of a forum or thread because of a search engine hit.

Good, you found the phrases. It should already be centered, as I have "align=center" in the table. You can code that table however you like, it's in the invite_forumrules template.
Reply With Quote
  #7  
Old 04-08-2006, 05:39 PM
kadafi_alive kadafi_alive is offline
 
Join Date: Dec 2004
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

how do I fix this problem:

Uncached templates: forumrules (1)
Reply With Quote
  #8  
Old 04-08-2006, 06:11 PM
tgreer tgreer is offline
 
Join Date: Oct 2005
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not sure - no one else has had this problem. You can try adding forumrules to the globaltemplates cache...

Go to your Plugin Manager, edit the TGREER_invite_template plugin. Add the colored code:

Code:
global $globaltemplates;

$globaltemplates  = array_merge($globaltemplates, array('invite_forumrules'));

$globaltemplates  = array_merge($globaltemplates, array('forumrules'));
Reply With Quote
  #9  
Old 04-08-2006, 07:08 PM
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Location: Google Kansas
Posts: 4,678
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

mine just tosses my forums menu off wack
Reply With Quote
  #10  
Old 04-08-2006, 09:21 PM
tgreer tgreer is offline
 
Join Date: Oct 2005
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quite right! I've turned off forum jump when I developed this, so didn't think to test it with it on. Uninstall for now, and I'll work on this as soon as I can.

If you'd like to try to adjust this yourself, in the invite_forumrules template, change the width of the table to something much smaller. Try changing $stylevar[formwidth] to a hard-coded value, such a "180px;"

Loco, I went to your forum... your Forum Jump menu is very wide due to some unusually long forum names. So, I don't think this is a bug, but you do need to adjust the width of the table as I suggested above. You can also add CSS styles to adjust the padding, border, etc.
Reply With Quote
Reply


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 03:22 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.08149 seconds
  • Memory Usage 2,299KB
  • Queries Executed 24 (?)
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
  • (2)bbcode_php
  • (1)bbcode_quote
  • (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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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