Bulk Generate Different Dates for Vbulletin

We sometimes use php or mysql to generate many different user names, we found all users’ joining dates are the same. How to deal this issue then?

Let me share my skills with you.

<? function rand_time($a,$b) { $a=strtotime($a); $b=strtotime($b); return date( “Y-m-d H:m:s”, mt_rand($a,$b)); } $date1=”2012-02-20 08:15:42″; $date2=”2013-05-7 08:15:42″; $num = 2000; $i=0; while ($i < $num){  $date = rand_time($date1,$date2);  $date=strtotime($date);  $datea[]= $date;  $i++; }

foreach ($datea as $values) { echo $values; echo “,<br>”;

} ?>

Posted in Vbulletin. Comments Off on Bulk Generate Different Dates for Vbulletin »

Vbulletin 4 display different text for different visitor’s computer language

If the visitor is from USA, the visitor’s computer language is en-us, or en; if the visitor is from France, the language is fr; if this visitor is from China, the language is zh-cn…

Sometimes we do not want our vbulletin forum show certain content to some visitors from certain counries, say if the visitor is from China, we do not show adsense, otherwise, adsense is displayed. How  to do then?
(more…)

Posted in Vbulletin. Comments Off on Vbulletin 4 display different text for different visitor’s computer language »

3useful skills of Vbulletin Version 4

Here let me share my 3 useful skills about Vbulletin Version 4.
1. members that have visited the forum today for unregistered users also;
2. Similar Threads not show up
3. Reset “Most Users Ever Online”

For first question, do as follows: (more…)

Posted in Vbulletin. Comments Off on 3useful skills of Vbulletin Version 4 »

Vbulletin Version 4.1.2 Installation Errors

When I install Version 4.1.2, the following errors come out:

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/cpgtxos/public_html/forums.glassesadvisor.com/includes/class_core.php on line 414

Warning: Cannot modify header information – headers already sent by (output started at /home/cpgtxos/public_html/forums.glassesadvisor.com/includes/class_core.php:414) in /home/cpgtxos/public_html/forums.glassesadvisor.com/install/includes/class_upgrade_ajax.php on line 731 (more…)

Posted in Php Study, Vbulletin. Comments Off on Vbulletin Version 4.1.2 Installation Errors »

Change Hostgator MySQL Password

Sometimes we want to change hostgator mysql database user password, or we have to change when we forgot the password. How to do?

Very simple infact, first delete the user name of the mysql and remake it, but make sure you use exactly the same name when remaking.

then bind the old database name to the new database user name.

next modify the user password in your software config file, for example, if you use wordpress, you have to modify wp-config.php; if you use vbulletin forum, just modify config.php

Posted in MySQL, Vbulletin, WordPress. Comments Off on Change Hostgator MySQL Password »

How to change Vbulletin forum mysql db prefix?

Follow the following procedure:
– Backup your database and verify it is a complete backup
– Close your board
– goto: http://www.myboard.com/install/tableprefix.php
– Follow the instructions
– When finished, edit your ./includes/config.php with the new prefix.
– Reopen board

Note: Do not alter the tableprefix value in config.php until this script has completed and you are given a message telling you to edit the value.

Posted in Vbulletin. Comments Off on How to change Vbulletin forum mysql db prefix? »

How to chang Vbulleting Domain Name?

Sometimes we want to change vbulleting forum domain name, here are some tips on how to do:

1. Before you change your old domain name to your new domain name, login into you cpanel, go to vBulletin Options, Choose Site Name / URL / Contact Details, and change your Forum URL to your new forum url, that is to say, your new domains.

2. Copy all file under your old web host to your new web host.

 3. Back up your old database and import to your new forum database. (more…)

Posted in Php Study, Vbulletin. Comments Off on How to chang Vbulleting Domain Name? »

How to add a link to the Thread Starter of Similar Threads?

I want to add a link to the Thread Starter of Similar Threads, ie:

<a target=”_blank” href=”http://forums.glassesadvisor.com/showthread.php?t=7224″>http://forums.glassesadvisor.com/showthread.php?t=7224</a>

The first Thread Starter of Similar Threads is Meadow. How to add a link to Meadow, if we click the link, I will be guided to Meadow’s profile page:
<a target=”_blank” href=”http://forums.glassesadvisor.com/member.php?u=2568″>http://forums.glassesadvisor.com/member.php?u=2568</a>

thanks.

A:template – showthread_similarthreadbit
<code>
<td nowrap=”nowrap” class=”alt2″></td>
<td nowrap=”nowrap” class=”alt2″></td>
<span class=”smallfont”><a href=”member.php?$session[sessionurl]u=$simthread[postuserid]”>$simthread[postusername]</a></span> </code>

Posted in Vbulletin. Comments Off on How to add a link to the Thread Starter of Similar Threads? »

Share 1 set vbulletin code with multi vbulletin forums in one host

If you have several vbulletin licenses, and you only have very small web hosting. I can tell you a skill on how to share one set vbulletin code with multi vbulletin licenses.

add the following to config.php.

'configlocalhost.php',
'127.0.0.1'=>'config127.php',
);
$url = $arrays[$_SERVER['HTTP_HOST']];
include $url;
?>

and change the other 2 forums’ config.php to configlocalhost.php and config127.php.

that’s all.

Posted in Php Code, Vbulletin. Comments Off on Share 1 set vbulletin code with multi vbulletin forums in one host »

Text Vbulletin vistor ip

<if condition=”$showabiaoip==’117.95.53.162′”>
$showabiaoip <br />
</if>

If  the vistor’s ip is 117.95.53.162, then show the visitor’s ip, otherwise, do nothing.

Posted in Vbulletin. Comments Off on Text Vbulletin vistor ip »
12
King Php Science Welcome, you are from: 77.106.241.85