PDA

View Full Version : Admin question


mike3k
09-19-2005, 05:32 PM
hi

Im adding a admin to my site and would like to make it so that they dont see when my VB is out of date and the links to the updates.

Ex
There is a newer version of vBulletin available to downloadLatest version available: 3.0.9
You are currently running vBulletin version 3.0.7
Click here to download vBulletin 3.0.9 from the Members' Area

I would like to make it so they dont see that please, only me the owner.

Thanks

Borgs8472
09-19-2005, 06:00 PM
in your index.php under /admincp/index.php

you need to find:
<script type="text/javascript" src="http://version.vbulletin.com/versioncheck.js"></script>
<script type="text/javascript" src="http://version.vbulletin.com/version.js?id=YOURVBLICENCEID"></script>
<script type="text/javascript">
<!--
if (typeof(vb_version) != "undefined" && isNewerVersion("<?php echo $vboptions['templateversion']; ?>", vb_version))
{
var current_version = "<?php echo $vboptions['templateversion']; ?>";
var latest_string = "<?php echo $vbphrase['latest_version_available_x']; ?>";
var current_string = "<?php echo $vbphrase['you_are_running_vbulletin_version_x']; ?>";
var download_string = "<?php echo $vbphrase['download_vbulletin_x_from_members_area']; ?>";

document.writeln('<table cellpadding="4" cellspacing="0" border="0" align="center" width="90%" class="tborder"><tr><td class="tcat" align="center"><b><?php echo $vbphrase['there_is_a_newer_vbulletin_version']; ?></b></td></tr><tr><td class="alt1" align="center">');
document.writeln('<p><b><a href="http://www.vbulletin.com/forum/showthread.ph' + 'p?postid=' + vb_announcementid + '" target="_blank">' + construct_phrase(latest_string, vb_version) + "</a></b></p>");
document.writeln('<p>' + construct_phrase(current_string, current_version.bold()) + '</p>');
document.writeln('<p><a href="http://www.vbulletin.com/members/" target="_blank">' + construct_phrase(download_string, vb_version.bold()) + '</a></p>');
document.writeln('</td></tr></table>');
}
//-->
</script>
And put a conditional statement around it, e.g:

<if condition="$bbuserinfo[userid]==YOURUSERID HERE">

The code I posted

</if>

[edit - oops, posted my licence ^_^ ]

mike3k
09-19-2005, 06:06 PM
ok i did this but it didnt work when i viewed with the other admin account it still shows on that too

my acc is user id 1


<if condition="$bbuserinfo[userid]==1">
<script type="text/javascript" src="http://version.vbulletin.com/versioncheck.js"></script>
<script type="text/javascript" src="http://version.vbulletin.com/version.js?id=VBFA757BC5"></script>
<script type="text/javascript">
<!--
if (typeof(vb_version) != "undefined" && isNewerVersion("<?php echo $vboptions['templateversion']; ?>", vb_version))
{
var current_version = "<?php echo $vboptions['templateversion']; ?>";
var latest_string = "<?php echo $vbphrase['latest_version_available_x']; ?>";
var current_string = "<?php echo $vbphrase['you_are_running_vbulletin_version_x']; ?>";
var download_string = "<?php echo $vbphrase['download_vbulletin_x_from_members_area']; ?>";

document.writeln('<table cellpadding="4" cellspacing="0" border="0" align="center" width="90%" class="tborder"><tr><td class="tcat" align="center"><b><?php echo $vbphrase['there_is_a_newer_vbulletin_version']; ?></b></td></tr><tr><td class="alt1" align="center">');
document.writeln('<p><b><a href="http://www.vbulletin.com/forum/showthread.ph' + 'p?postid=' + vb_announcementid + '" target="_blank">' + construct_phrase(latest_string, vb_version) + "</a></b></p>");
document.writeln('<p>' + construct_phrase(current_string, current_version.bold()) + '</p>');
document.writeln('<p><a href="http://www.vbulletin.com/members/" target="_blank">' + construct_phrase(download_string, vb_version.bold()) + '</a></p>');
document.writeln('</td></tr></table>');
}
//-->
</script>
</if>

Kingzor
09-19-2005, 07:51 PM
here you go.overwrite your current thing with this


<script type="text/javascript" src="http://version.vbulletin.com/versioncheck.js"></script>
<script type="text/javascript" src="http://version.vbulletin.com/version.js?id=VBFA757BC5"></script>
<script type="text/javascript">
var USER_string = "<?php echo $bbuserinfo[userid]; ?>";
if (USER_string == 1)
{
<!--
if (typeof(vb_version) != "undefined" && isNewerVersion("<?php echo $vboptions['templateversion']; ?>", vb_version))
{
var current_version = "<?php echo $vboptions['templateversion']; ?>";
var latest_string = "<?php echo $vbphrase['latest_version_available_x']; ?>";
var current_string = "<?php echo $vbphrase['you_are_running_vbulletin_version_x']; ?>";
var download_string = "<?php echo $vbphrase['download_vbulletin_x_from_members_area']; ?>";




document.writeln('<table cellpadding="4" cellspacing="0" border="0" align="center" width="90%" class="tborder"><tr><td class="tcat" align="center"><b><?php echo $vbphrase['there_is_a_newer_vbulletin_version']; ?></b></td></tr><tr><td class="alt1" align="center">');
document.writeln('<p><b><a href="http://www.vbulletin.com/forum/showthread.ph' + 'p?postid=' + vb_announcementid + '" target="_blank">' + construct_phrase(latest_string, vb_version) + "</a></b></p>");
document.writeln('<p>' + construct_phrase(current_string, current_version.bold()) + '</p>');
document.writeln('<p><a href="http://www.vbulletin.com/members/" target="_blank">' + construct_phrase(download_string, vb_version.bold()) + '</a></p>');
document.writeln('</td></tr></table>');
}
//-->
}
</script>


make sure to remove <if condition="$bbuserinfo[userid]==1">
and </if>