Making BellaBuffs Work Better for You


This article might not be very efficient for the fanlisting owner of one or two listings, but for people who have large collectives of fanlistings (probably in the 10+ range), this is an article for you. Also, if you’re an efficiency freak like me, or lazy (also like me), this is for you, too.

One thing that I would consider the downfall of maintaining your fanlistings with a script such as BellaBuffs is how you can’t use the same base script for each one without all your fanlistings sounding like drones. “Welcome to (title), the fanlisting for (subject)!” Unless you change the text in each individual file (your members pages, your rules, your codes, etc), the pages for all your fanlistings will sound and look the exact same.

But they’re fanlistings! They’re unique and special not only to you, but to their fans. They SHOULD have unique text, to show off their own lingo and style. But if you have to change the text in each file for every page, you might as well maintain your listings by hand. What’s adding a few <li>’s when you’re already editing all your text? So why do we even HAVE these scripts? To make life easier. But they’re not making life as easy as possible, are they?

Well, that’s where this article comes in. Welcome to the article for a one-script-fits-all BellaBuffs.

The theory behind the idea is that you should be able to have a one “static” version of BellaBuffs on your computer that you can upload into any fanlisting directory you have, the subject being anything from M.A.C. makeup to World of Warcraft. This way, you’re not bloating up your computer with unnecessary index, about, button, etc. files. The only unique file you will have to store for each listing is prefs.php, the file that keeps each listing’s exclusive text.

Your job is to make a template for each page. For example, here is a basic template for an index page (this is based on the assumption you’re using headers):

<h1>welcome to (title)</h1>
(welcome text)
<h1>(title)'s stats</h1>
members: (memberscount)
pending: (memberspending)

Let’s say your fanlisting is for mint chocolate chip ice cream (a subject close to my heart). The title of your fanlisting is Minty-Fresh. You want your welcome text to say:

Welcome to Minty-Fresh, the fanlisting for that uber-delicious, creamy, frosty treat, Mint Chocolate Chip Ice Cream!

Now, it’s not like you can just leave that welcome text in your index template… if you have a fanlisting for Transformers, it’s not like you can call your fanlisting “Minty-Fresh,” when a more proper title would be something like “Metamorphosis.” And nor can you describe Transformers as a creamy, frosty treat. Well, BellaBuffs has solved the first problem for you; in the file prefs.php, you can edit the title of your fanlisting in the line

$title = "title"; // name of fanlisting

You simply replace title with Minty-Fresh. When you enter the text for your introductory header, the code looks like this:

<h1>Welcome to <?php echo $title; ?></h1>

The php code mentioned above calls your fanlisting title from the prefs.php file, so when the browser loads the page, the viewer will see “Welcome to Minty-Fresh!” as the text that greets them. That way, for any fanlisting, you can have a static welcome header, whether it says “Welcome to Minty-Fresh!” or “Welcome to Metamorphosis!”

However, the latter problem of the introductory text is NOT magically solved in the current BellaBuffs script. The great thing is, with a little PHP magic just like the fanlisting title, you can have your exclusive introductory text called from our preferences — making it so the only thing you have to edit is your prefs.php, and never index.php after creating your template!

In prefs.php, you will need to add a line. The first part of this file should look like this:

$title = "title"; // name of fanlisting
$FLsubject = "subject"; // subject of fanlisting (e.g "coffee")
$FLurl = ""; // url of fanlisting - no trailing slash (don't add a '/' at the end)!

Under the line containing the variable $FLurl, you will need to add a new variable, $introtext, and you will have to define the introductory text. So, continuing with the mint chocolate chip ice cream example (which may not be a good idea for my thighs, if I keep craving it like this…), the beginning of your prefs.php file will look like this:

$title = "Minty-Fresh"; // name of fanlisting
$FLsubject = "Mint Chocolate Chip Ice Cream"; // subject of fanlisting (e.g "coffee")
$FLurl = ""; // url of fanlisting - no trailing slash (don't add a '/' at the end)!
$introtext = "Welcome to <strong>Minty-Fresh</strong>, the fanlisting for that uber-delicious, creamy, frosty treat, <em>Mint Chocolate Chip Ice Cream!</em>";

Now that your introduction is in prefs.php, you need to make it viewable in your new index.php template. It should now look something like this:

<h1>welcome to <?php echo $title; ?></h1>
<?php echo $introtext; ?>
<h1><?php echo $title; ?>'s stats</h1>
members: (memberscount)
pending: (memberspending)

And now, your readers will see:

Welcome to Minty-Fresh

Welcome to Minty-Fresh, the fanlisting for that uber-delicious, creamy, frosty treat, Mint Chocolate Chip Ice Cream!

Minty-Fresh’s Stats

Members: 0
Pending: 0

The thing is, all the unique text was pulled from one file — prefs.php. You could edit your title and introtext variables of your various pref.php files so they match all your fanlistings and all you have to do is upload the same exact version of BellaBuffs you have for each one. Your index.php file will follow the same template for each listing. The variables are where the “meat” of your site is.

So, here’s a wrap up:

  1. You’re going to need ONE copy of BellaBuffs.
  2. You will have to create templates for each page you plan to have unique text in.
  3. You will need to upload your copy of BellaBuffs with all the new templates to each fanlisting directory you have. The point of this tutorial is to have one copy of BellaBuffs on your machine that you can upload to your different directories, NOT one copy of BellaBuffs on your server.
  4. Customize your prefs.php files to fit each, individual fanlisting. You will need a separate prefs.php file for each fanlisting you own, in each directory.
  5. Open your fanlistings!

That’s the end of this tutorial, but it’s not the end of the possibilities! You want a unique about page? Create a variable in prefs.php called about and enter the text. Call it from prefs.php using the same echo code we used for the intro text. You want to list the date your fanlisting was approved? Add the variable dateapproved, define the date the same way we defined the title, and call it using the same echo code.

Really, you can do anything with this… be creative! Be elaborate! And all you need is one file.

Enjoy creating your many fanlistings with ease :)


5 Responses to “Making BellaBuffs Work Better for You”

  1. BellaBUffs would even work better for me if
    1. i could include an upload line on the contact page (how can ppl send a button without such a thing???) … and
    2. if the buttons would be sorted according to their size instead of the date when uploaded when I click on “view all” …

    Does anyone happen to have tips? *loL*

  2. 2 Alexwebmaster

    Hello webmaster
    I would like to share with you a link to your site
    write me here

  3. 3 heng

    would you like to share with me to email: thanks

  4. Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.

  1. 1 Making BellaBuffs work better for you… Part II « Chicken Scratches

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: