This snippet will add lines in your FLINX Collective for your fanlistings total members, total countries, pending members, and last update day. This is a modification of the tutorial found here. Note, this can only be used if you update your fanlistings using PHPFanbase. Want to see what it looks like? Then just go into any category of my FLINX collective and look at the entries.
First, open up category.php in your flinx collective. Make sure you have a clean copy just in case something goes wrong. This is what you will need to find:
<b>Title:</b> <?=$row["title"]?><br>
<b>Subject:</b> <?=$row["subject"]?><br>
<b>Opened:</b> <?=$row["date"]?><br>
<i><?=$row["description"]?></i>
Once you have located that information, paste this anywhere you want the new variables of members, country, and pending members to go:
<?
$url=$row["url"];
$path = ereg_replace (“http://”, “”, $url);
$folder = ereg_replace (“.yourdomain.com”, “”, $path);
include(“/home/username/public_html/$folder/config.php”);
$query1=”SELECT * FROM $table WHERE apr=’y'”;
$result1=mysql_query($query1);
$num1=mysql_numrows($result1);
$query2=”SELECT * FROM $table WHERE apr=’-'”;
$result2=mysql_query($query2);
$num2=mysql_numrows($result2);
$query3=”SELECT DISTINCT country FROM $table WHERE apr=’y'”;
$result3=mysql_query($query3);
$num3=mysql_numrows($result3);
?>
<b>Members:</b> <?=$num1?><br>
<b>Countries:</b> <?=$num3?><br>
<b>Pending:</b> <?=$num2?><br>
<?
$query4=”SELECT * FROM $table_u”;
$result4=mysql_query($query4);
$num4=mysql_numrows($result4);
$i=0;
while ($i < $num4) {
$last=mysql_result($result4,$i,”date”);
?>
<b>Last update</b>: <?=$last?><br>
<? ++$i; } ?>
Afterwards, look in the above snippet and find these two lines. You will need to insert your domain into the yourdomain.com (no http://!), and your path. Make sure to keep the areas of /$folder/config.php the same:
$folder = ereg_replace (“.yourdomain.com”, “”, $path);
include(“/home/username/public_html/$folder/config.php”);
Page Views: 11 views



















