The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
See 5 photos and then have to register
Hey all. There is a plugin on here that lets guests view 5 THREADS and then have to register to see more.
I wonder if someone can help me change it so that instead of threads it will let guests see 5 IMAGES in my photopost galleries before they have to register. The code of the plugin is as follows but I have no clue what to change to make it note the number of image views into the cookie instead of the number of thread views. Any help is REALLY appreciated. Cheers! Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <product productid="limited_guest_viewing" active="1"> <title>Limited Guest Viewing</title> <description>Limit guests to view a set number of threads before being locked out.</description> <version>1.0.6</version> <url>http://www.moderninsider.com/forums/forumdisplay.php?f=13</url> <versioncheckurl /> <dependencies> <dependency dependencytype="vbulletin" minversion="3.6.0" maxversion="" /> </dependencies> <codes> </codes> <templates> <template name="limited_guest_viewing" templatetype="template" date="0" username="Ted S" version="1.0.5"><![CDATA[ <!-- LGV :: Register Take-Over Message --> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="alt1"> <phrase 1="$vboptions[bbtitle]" 2="$vboptions[bburl]">$vbphrase[lgvmess]</phrase> </td> </tr> </table> <br /> <!-- / LGV :: Register Take-Over Message --> ]]></template> </templates> <plugins> <plugin active="1"> <title><![CDATA[LGV System [Template Cache]]]></title> <hookname>cache_templates</hookname> <phpcode><![CDATA[ $globaltemplates[] = 'limited_guest_viewing'; ]]></phpcode> </plugin> <plugin active="1"> <title><![CDATA[LGV System [Thread Check]]]></title> <hookname>showthread_getinfo</hookname> <phpcode><![CDATA[ ($hook = vBulletinHook::fetch_hook('lgv_plugin')) ? eval($hook) : false; ]]></phpcode> </plugin> <plugin active="1"> <title><![CDATA[LGV System [View Post Check]]]></title> <hookname>showpost_start</hookname> <phpcode><![CDATA[ ($hook = vBulletinHook::fetch_hook('lgv_plugin')) ? eval($hook) : false; ]]></phpcode> </plugin> <plugin active="1"> <title><![CDATA[LGV System [Print Thread Check]]]></title> <hookname>printthread_start</hookname> <phpcode><![CDATA[ ($hook = vBulletinHook::fetch_hook('lgv_plugin')) ? eval($hook) : false; ]]></phpcode> </plugin> <plugin active="1"> <title><![CDATA[LGV System [Processing Routine]]]></title> <hookname>lgv_plugin</hookname> <phpcode><![CDATA[ // check if user is a bot $lvgbot = ($vbulletin->superglobal_size['_COOKIE'] == 0 AND preg_match("#(google|msnbot|zoints|aol|yahoo|slurp)#si", $_SERVER['HTTP_USER_AGENT'])); // check if user is a guest and if system is enabled if ($show['guest'] AND !$lvgbot AND $vbulletin->options['lgvon']) { // update guest view counter cookie $lgv = $vbulletin->input->clean_gpc('c', COOKIE_PREFIX . 'userlgv', TYPE_UINT); $lgv++; vbsetcookie('userlgv', $lgv); // build array of excluded forums if (trim($vbulletin->options['lgvforumids']) != '') { $lgvforumids = preg_split('#\s+#s', $vbulletin->options['lgvforumids'], -1, PREG_SPLIT_NO_EMPTY); } else { $lgvforumids = Array('0'); } // check if requested forum is exluded if(!in_array($thread['forumid'],$lgvforumids) AND !in_array($threadinfo['forumid'],$lgvforumids)) { // check if message option is on and if user qualifies if ($vbulletin->options['lgvmesson'] AND $lgv > $vbulletin->options['lgvmesscnt'] AND $lgv <= $vbulletin->options['lgvblckcnt']) { //eval(standard_error(fetch_error('lgvmess',$lgv,$vbulletin->options['lgvcnt']))); eval('$lgvmessage = "' . fetch_template('limited_guest_viewing') . '";'); // check block option is on and user qualifies } else if ($vbulletin->options['lgvblckon'] AND $lgv > $vbulletin->options['lgvblckcnt']) { eval(standard_error(fetch_error('lgvblck',$vbulletin->options['bbtitle'],$vbulletin->options['bburl']))); } } } ]]></phpcode> </plugin> </plugins> <phrases> <phrasetype name="error" fieldname="error"> <phrase name="lgvblck" date="0" username="Ted S" version="1.0.6"><![CDATA[Hey there!<br \><br \>It appears that you've exceeded the maximum number of posts you can view, but wait, there's a simple solution. To unlock the forum and continue viewing messages, all you need to do is <a href="{2}/register.php">sign up</a> for a free account. The entire process takes just a few minutes so <a href="{2}/register.php">create your account now</a> and view as many threads as you like!<br \><br \>Already a member? Login at the top of this page to stop seeing this message.]]></phrase> </phrasetype> <phrasetype name="global" fieldname="global"> <phrase name="lgvmess" date="0" username="Ted S" version="1.0.5"><![CDATA[Hey there!<br /><br />It looks like you're enjoying {1} but haven't created an account yet. Why not take a minute to <a href="{2}/register.php">register</a> for your own free account now? As a member you get free access to all of our forums and posts plus the ability to post your own messages, communicate directly with other members and much more. <a href="{2}/register.php">Register now!</a><br /><br />Already a member? Login at the top of this page to stop seeing this message. ]]></phrase> </phrasetype> <phrasetype name="vBulletin Settings" fieldname="vbsettings"> <phrase name="setting_lgvon_desc" date="0" username="Ted S" version="1.0.5"><![CDATA[This option allows you to enable or disable the Guest Limited Viewing System.]]></phrase> <phrase name="setting_lgvon_title" date="0" username="Ted S" version="1.0.5"><![CDATA[Enable Limited Guest Viewing]]></phrase> <phrase name="setting_lgvmesson_desc" date="0" username="Ted S" version="1.0.5"><![CDATA[This option allows you to enable or disable the Register Take-Over Message. When enabled, guests will see a message above the posts prompting them to register after they have viewed as many threads as you specify.]]></phrase> <phrase name="setting_lgvmesson_title" date="0" username="Ted S" version="1.0.5"><![CDATA[Enable Register Take-Over Message]]></phrase> <phrase name="setting_lgvmesscnt_desc" date="0" username="Ted S" version="1.0.5"><![CDATA[This option allows you to set the number of threads/ posts a guest may view before receiving seeing the Register Take-Over Message.<br /><br />To edit the phrase for this message error, <a href="./phrase.php?do=edit&e[global][lgvmess]">click here</a> (enter your custom text in the translation box).]]></phrase> <phrase name="setting_lgvmesscnt_title" date="0" username="Ted S" version="1.0.5"><![CDATA[Register Take-Over Message Count]]></phrase> <phrase name="setting_lgvblckon_desc" date="0" username="Ted S" version="1.0.5"><![CDATA[This option allows you to enable or disable the Register Block Page. When enabled, guests will see a message above the posts prompting them to register after they have viewed as many threads as you specify.]]></phrase> <phrase name="setting_lgvblckon_title" date="0" username="Ted S" version="1.0.5"><![CDATA[Enable Register Block Page]]></phrase> <phrase name="setting_lgvblckcnt_desc" date="0" username="Ted S" version="1.0.5"><![CDATA[This option allows you to set the number of threads/ posts a guest may view before receiving the error message. If you are using the Register Take-Over Message, this setting should be set higher.<br /><br />To edit the phrase for this message error, <a href="./phrase.php?do=edit&e[error][lgvblck]">click here</a> (enter your custom text in the translation box).]]></phrase> <phrase name="setting_lgvblckcnt_title" date="0" username="Ted S" version="1.0.5"><![CDATA[Register Block Page Count]]></phrase> <phrase name="setting_lgvforumids_desc" date="0" username="Ted S" version="1.0.5"><![CDATA[This option allows you to exclude forums from the guest viewing limit. For example, you can enable guests to view threads in your announcements or support forums even if they have already exceeded their viewing allotment.<br /><br />Enter a list of forum ids, separated by spaces (for example: 4 9 27 42).]]></phrase> <phrase name="setting_lgvforumids_title" date="0" username="Ted S" version="1.0.5"><![CDATA[Excluded Forum Ids]]></phrase> <phrase name="settinggroup_lgvgroup" date="0" username="Ted S" version="1.0.5"><![CDATA[Limited Guest Viewing System]]></phrase> </phrasetype> </phrases> <options> <settinggroup name="lgvgroup" displayorder="1001"> <setting varname="lgvon" displayorder="10"> <datatype>boolean</datatype> <optioncode>yesno</optioncode> <defaultvalue>0</defaultvalue> </setting> <setting varname="lgvmesson" displayorder="20"> <datatype>boolean</datatype> <optioncode>yesno</optioncode> <defaultvalue>0</defaultvalue> </setting> <setting varname="lgvmesscnt" displayorder="30"> <datatype>number</datatype> <defaultvalue>5</defaultvalue> </setting> <setting varname="lgvblckon" displayorder="40"> <datatype>boolean</datatype> <optioncode>yesno</optioncode> <defaultvalue>0</defaultvalue> </setting> <setting varname="lgvblckcnt" displayorder="50"> <datatype>number</datatype> <defaultvalue>10</defaultvalue> </setting> <setting varname="lgvforumids" displayorder="60"> <datatype>text</datatype> <defaultvalue>0</defaultvalue> </setting> </settinggroup> </options> <helptopics> </helptopics> <cronentries> </cronentries> <faqentries> </faqentries> </product> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|