Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

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
  #12  
Old 04-10-2006, 06:07 PM
kadafi_alive kadafi_alive is offline
 
Join Date: Dec 2004
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unfortunately this hack adds 4/5 queries to the showthread
Reply With Quote
  #13  
Old 04-10-2006, 07:48 PM
tgreer tgreer is offline
 
Join Date: Oct 2005
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How so? The templates should be cached, so no queries there.

I realize that this can be optimized by placing all the code in the TGREER_invite_search_terms plugin inside a conditional:

PHP Code:
if ( (THIS_SCRIPT == 'showthread' OR THIS_SCRIPT =='forumdisplay') AND !$vbulletin->userinfo['userid']) 

 
## all the plugin code

So, what additional queries are being run?
Reply With Quote
  #14  
Old 04-10-2006, 08:05 PM
kadafi_alive kadafi_alive is offline
 
Join Date: Dec 2004
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tgreer
How so? The templates should be cached, so no queries there.

I realize that this can be optimized by placing all the code in the TGREER_invite_search_terms plugin inside a conditional:

PHP Code:
if ( (THIS_SCRIPT == 'showthread' OR THIS_SCRIPT =='forumdisplay') AND !$vbulletin->userinfo['userid']) 

 
## all the plugin code

So, what additional queries are being run?
I have no idea what these queries are but when I installed the hack, five queries were added and when I uninstalled it, they were gone.
Reply With Quote
  #15  
Old 04-10-2006, 08:26 PM
tgreer tgreer is offline
 
Join Date: Oct 2005
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, then, I don't understand the issue. The plugin does not create any additional database queries.

It creates 1 new template, which is cached. It creates two plugins, and it creates three phrases.

It could very well be that your additional queries are the plugins themselves, plus the phrases. Any code that uses plugins/phrases (which is most of them, of course), will behave similarly.

The real question is if you're seeing any actual performance degradation. I would think not.
Reply With Quote
  #16  
Old 05-16-2006, 09:26 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

Ive turned the forum jump off and reinstalled this, thx
Reply With Quote
Reply

Thread Tools

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 11:42 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03793 seconds
  • Memory Usage 2,263KB
  • Queries Executed 21 (?)
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
  • (4)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
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)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