[REQ] 10 Add-ons

Here you go, download the hacks here:

http://www.megaupload.com/?d=P8FG77IW

all the code edits are here:

Force Users to Read a Thread:

Open file global.php

Find:
PHP:
if (!empty($db->explain))
Place BEFORE:
PHP:
($hook = vBulletinHook::fetch_hook('global_setup_complete')) ? eval($hook) : false;
Save file.


Open file includes/xml/hooks_vbulletin.xml

Find:
PHP:
<hook>global_start</hook>
Place BEFORE:
PHP:
<hook>global_setup_complete</hook>
Save file.


vB Ad Management 3.1 (Ad Sharing Edition)
IN FILE vb_ad_management_3xx.xml, FIND:
PHP:
<template name="footer_advertisement" templatetype="template"><![CDATA[ 
        <div align="center"> 
            $footer_adcode 
        </div> 
]]></template>

ADD BELOW:
PHP:
<template name="custom_advertisement" templatetype="template"><![CDATA[ 
        <div> 
            $custom_adcode 
        </div> 
]]></template>

FIND:
PHP:
<setting varname="adintegrate_footer_adcode_rand" displayorder="45"> 
    <datatype>free</datatype> 
    <optioncode>textarea</optioncode> 
</setting>

ADD BELOW:
PHP:
<setting varname="adintegrate_custom_onoff" displayorder="991"> 
    <datatype>boolean</datatype> 
    <optioncode>yesno</optioncode> 
    <defaultvalue>0</defaultvalue> 
</setting> 
<setting varname="adintegrate_custom_adcode" displayorder="992"> 
    <datatype>free</datatype> 
    <optioncode>textarea</optioncode> 
</setting> 
<setting varname="adintegrate_custom_adcode_rand" displayorder="993"> 
    <datatype>free</datatype> 
    <optioncode>textarea</optioncode> 
</setting>


IN FILE includes/vb_ad_management/cache_templates.php, FIND:
PHP:
if ($vbulletin->options['adintegrate_footer_onoff']) 
{ 
    $adtemplates[] = 'footer_advertisement'; 
}

ADD ABOVE:
PHP:
if ($vbulletin->options['adintegrate_custom_onoff']) 
{ 
    $adtemplates[] = 'custom_advertisement'; 
}

IN FILE includes/vb_ad_management/global_start.php, FIND:

PHP:
if ($vbulletin->options['adintegrate_footer_onoff'])

ADD ABOVE:
PHP:
if ($vbulletin->options['adintegrate_custom_onoff']) 
{     
    if ($vbulletin->options['adintegrate_custom_adcode']) 
    { 
        $custom_split = explode("$adshared", $vbulletin->options['adintegrate_custom_adcode']); 
        $custom_adcode = $custom_split[0]; 
        if ($custom_split[1]) 
        { 
            $custom_adcode = $custom_split[0] . $GLOBALS['adcode_shared'] . $custom_split[1]; 
        } 
        eval('$custom_advertisement = "' . fetch_template('' . custom_advertisement . '') . '";'); 
    } 
    else if ($vbulletin->options['adintegrate_custom_adcode_rand']) 
    { 
        $custom_adcode = explode("$addelimiter", $vbulletin->options['adintegrate_custom_adcode_rand']); 
        $custom_rand = array_rand($custom_adcode); 
        $custom_adcode = $custom_adcode["$custom_rand"]; 
        $custom_split = explode("$adshared", $custom_adcode); 
        $custom_adcode = $custom_split[0]; 
        if ($custom_split[1]) 
        { 
            $custom_adcode = $custom_split[0] . $GLOBALS['adcode_shared'] . $custom_split[1]; 
        } 
        eval('$custom_advertisement = "' . fetch_template('' . custom_advertisement . '') . '";'); 
    }     
}

Mark Threads As 'Solved'
SHOWTHREAD

Find:
PHP:
		<if condition="$show['addpoll']">
			<div><img class="inlineimg" src="$stylevar[imgdir_button]/addpoll.gif" alt="$vbphrase[add_a_poll]" vspace="1" /> <a href="poll.php?$session[sessionurl]do=newpoll&t=$threadinfo[threadid]">$vbphrase[add_a_poll_to_this_thread]</a></div>
		</if>
	</div>
	<!-- / thread tools -->
Replace with:
PHP:
		<if condition="$show['addpoll']">
			<div><img class="inlineimg" src="$stylevar[imgdir_button]/addpoll.gif" alt="$vbphrase[add_a_poll]" vspace="1" /> <a href="poll.php?$session[sessionurl]do=newpoll&t=$threadinfo[threadid]">$vbphrase[add_a_poll_to_this_thread]</a></div>
		</if>
		<if condition="$show['solvedthread']">
			<div><img class="inlineimg" src="$stylevar[imgdir_button]/marksolved.gif" alt="$vbphrase[solvedthread_marksolved]" vspace="1" /> <a href="solved.php?$session[sessionurl]do=marksolved&t=$threadinfo[threadid]">$vbphrase[solvedthread_marksolved]</a></div>
		<else />
			<if condition="$show['solvedthread_unsolve']">
			<div><img class="inlineimg" src="$stylevar[imgdir_button]/marksolved.gif" alt="$vbphrase[solvedthread_markunsolved]" vspace="1" /> <a href="solved.php?$session[sessionurl]do=markunsolved&t=$threadinfo[threadid]">$vbphrase[solvedthread_markunsolved]</a></div>
		</if>
	</if>
	</div>
	<!-- / thread tools -->
Find:
PHP:
	<if condition="$show['addpoll']">
	<tr>
		<td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/addpoll.gif" alt="$vbphrase[add_a_poll]" /> <a href="poll.php?$session[sessionurl]do=newpoll&t=$threadinfo[threadid]">$vbphrase[add_a_poll_to_this_thread]</a></td>
	</tr>
	</if>
	<if condition="$show['adminoptions']">
Replace with:
PHP:
	<if condition="$show['addpoll']">
	<tr>
		<td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/addpoll.gif" alt="$vbphrase[add_a_poll]" /> <a href="poll.php?$session[sessionurl]do=newpoll&t=$threadinfo[threadid]">$vbphrase[add_a_poll_to_this_thread]</a></td>
	</tr>
	</if>
	<if condition="$show['solvedthread']">
	<tr>
		<td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/marksolved.gif" alt="$vbphrase[solvedthread_marksolved]" /> <a href="solved.php?$session[sessionurl]do=marksolved&t=$threadinfo[threadid]">$vbphrase[solvedthread_marksolved]</a></td>
	</tr>
		<else />
			<if condition="$show['solvedthread_unsolve']">
	<tr>
		<td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/marksolved.gif" alt="$vbphrase[solvedthread_markunsolved]" /> <a href="solved.php?$session[sessionurl]do=markunsolved&t=$threadinfo[threadid]">$vbphrase[solvedthread_markunsolved]</a></td>
	</tr>
		</if>
	</if>
	<if condition="$show['adminoptions']">Set options in AdminCP >
 
Back
Top