vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Board Optimization - Welcome headers - Improve community registration rates (https://vborg.vbsupport.ru/showthread.php?t=119572)

Dunc 07-28-2006 03:07 PM

I downloaded this but when I tried to extract it said there were no files to extract and when I double-clicked the zipped folder it said it was corrupt or invalid.

Help ;o

Mudvayne 07-29-2006 08:14 AM

Try download again.. Hope it 'll b ok then :)..

Dunc 07-29-2006 10:50 AM

How random. It works ;o

Thanks =D

Delphiprogrammi 07-31-2006 08:44 AM

i got it to work after some trouble anyway nice idea

tpzone 08-05-2006 04:16 AM

very nice. it's to the point and useful.

easy installation for a vbul newbie like myself. first mod i installed and works like a charm.

thank you.

Mike Gaidin 08-05-2006 12:52 PM

The one I was waiting for!

/me clicks install!

Henneth 08-05-2006 01:02 PM

Superb mod - thanks and well done!

duskdawn 08-06-2006 12:55 AM

I'll take a try thanks.

dragonhart 08-06-2006 12:17 PM

Thanks very much:D Dragonhart

mawby 08-07-2006 08:56 AM

Just to confirm my banner for nearly expired paid subscriptions modification detailed here still works with this version. As the location of where to put the template changes have changed I'll re-copy the original post here and update it.



If like me, you want a banner to be displayed to people who have a paid subscription which is about to expire, you can achieve it with the following.

Firstly create a global phrase named "welcome_soontoexpire" containing the message you want displayed. I chose the following...

Code:

<center><strong>Your Club Membership will expire in {1} days.</strong><br /><br />We hope you will choose to stay with us!</center>
...which will tell them their paid subscription is about to run out, plus it will tell them the number of days they have left.

Next edit the "welcome_headers" template and add...

PHP Code:

<if condition="$headerexpiremembership != 0">
    <!-- / 
membership nearly expired -->
    <
br />
    <
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
    <
tr
        <
td class="alt1" style="background-color:#FF0000;">
            <
phrase 1="$headerexpiremembership">$vbphrase[welcome_soontoexpire]</phrase>
        </
td>
    </
tr
    </
table>
    <!-- / 
membership nearly expired -->

<else /> 

...before this line of code.

PHP Code:

<if condition="$wlhtime > $bbuserinfo[lastpost] AND $vboptions[wlhpostmoreoften] AND !is_member_of($bbuserinfo,6,5)"

Also add the following to the end of the template, just before the "<!-- google_ad_section_end -->" line...

PHP Code:

</if> 

Finally create a plugin for the "Welcome Headers" product with a hook location of "global_start". Set the title to "Soon to expire memberships", and add the following as the PHP plugin code.

PHP Code:

$subscriptions_reminders $vbulletin->db->query_read("
    SELECT subscriptionid, expirydate
    FROM " 
TABLE_PREFIX "subscriptionlog AS subscriptionlog
    WHERE expirydate <= " 
. (TIMENOW + (86400 14)) . "
        AND status = 1
        AND userid = " 
$vbulletin->userinfo['userid'] . "
"
);

while (
$subscriptions_reminder $vbulletin->db->fetch_array($subscriptions_reminders))
{
    
$headerexpiremembership round((($subscriptions_reminder['expirydate'] - TIMENOW) / 86400),1);


That's it! It is hard coded to display the banner when the paid subscription has 14 days or less remaining. You can change the 14 on the following line to be however many days notice you want.

PHP Code:

    WHERE expirydate <= " . (TIMENOW + (86400 * 14)) . " 



All times are GMT. The time now is 04:45 PM.

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.01957 seconds
  • Memory Usage 1,757KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete