/*
*
********************************************
* ButtonUp - A Button Wall Php Script
* Version 2.3
* Script by Tec
* ButtonUp © Tec 2004 - 2006
********************************************
* Do not distribute this script without
* notifying me. This is linkware: free to
* use as long as you link back to my page.
* If you paid for this you were screwed,
* big time, and I would appreciate it if
* you'll get in touch with me.
********************************************
* If you need assistance everything can be
* seen at this readme.txt file. If you need
* further help, I can be contacted at this
* email:
*
* roronoa@gmail.com
*
* or you may post a comment on this site:
*
* http://marikit.org/scripts/buttonup/
*
********************************************
*/
===========
= Updates =
===========
09.07.2006 - Updated functions.php to add an option to link or not to link
buttons.
02.28.2006 - Updated admin.php to remove the limitation in button/image width
and height.
12.07.2005 - Updated functions.php because displaying per category doesn't work
for everybody. Fixed that one now.
10.29.2005 - After more than a year, released version 2.0. Additions and changes
are listed below in the features.
05.04.2004 - Someone requested that the index.php can reside on another directory.
so I came up with a slight revision to the following files: admin.php,
functions.php and config.php
04.15.2004 - ButtonUp released
===============
= Information =
===============
Don't you find it tiring to update your button wall or link list everytime? When you
want to update it, you have to fix your html, add the new links, take out the outdated
links, open your ftp client, upload the button and the new html? Personally, I found
that a bit tiresome, so I came up with this one. ButtonUp's a button/link management
php script. No need to do all of those, just login, then upload and see the buttons
add up to your link page instantly! I find this convenient... hope you do too. ^_^
If you find a bug or error anywhere, if you find this useful, if you want to suggest a
feature, if you just want to comment or if you just want to leave some feedback, feel
free to contact me.
tec: roronoa@gmail.com
buttonup: http://marikit.org/scripts/buttonup/
============
= Features =
============
v2.3: - abiliy to link or not to link a set of buttons
v2.2: - fixed button width/height limit
v2.1: - fixed "displaying-per-category" feature
v2: - new "alt" field
- create and delete categories for organizing links
- editable link buttons including the ability to change the links, alt attribute,
category, and the button images
- able to view and display links for a specific category only
v1.1: - index.php able to reside outside of the installation folder
v1: - upload and delete link buttons
- display links sorted either alphabetically or by date added
================
= Requirements =
================
PHP 4.3
MySQL 4.1
* Your server should have REGISTER_GLOBALS set to on. To check and set REGISTER_GLOBALS
just scroll down and i'll explain everything. I'll be working on a version that doesn't
require REGISTER_GLOBALS soon.
=========
= Files =
=========
readme.txt - you're reading this one
config.php - stores all your settings
functions.php - where all necessary functions are kept
login.php - page for logging in
admin.php - page for uploading, deleting and managing all your links and buttons
index.php - this would be the file that you'll mainly be working with. paste your
html in here. more info below...
==============
= Installing =
==============
1. Upload all .php files to a folder in your server (this would usually be the /links
folder). Now CHMOD (change permissions) config.php to 666.
2. Create a separate folder where you'll keep all your buttons and chmod it too to 777.
3. Point your browser to http://yoursite/login.php and use the password "password"
without the quotes to login.
4. Once logged in, you'll see the configuration box. Fill up all the boxes with the
correct information and make sure to change your password for security measures. Once
completed click on "update config".
5. If done correctly, another button, "create tables" will show up. Click that too
and after creating the necessary tables, you're set to upload your buttons.
====================
= REGISTER_GLOBALS =
====================
To check if you have REGISTER_GLOBALS set to on, open up notepad and type:
Save the file as phpinfo.php and upload it to your server. Point your browser to
http://pathto/phpinfo.php and look for REGISTER_GLOBALS. Check that the value is set to ON.
In case that REGISTER_GLOBALS is set to OFF, you could turn it ON by creating an .htaccess file
and pasting the following line:
php_flag register_globals on
and uploading it to the folder where you installed ButtonUp.
=============
= Upgrading =
=============
Before upgrading, please, I'm really recommending that you BACKUP both database and your files.
The upgrading steps below worked fine on my end, but it might not work for you. So please, please,
please. Please backup database and files first before proceeding.
A. Upgrading from ButtonUp 1.1/ButtonUp 1 to ButtonUp 2.+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Upload ONLY the following files: admin.php and functions.php. DO NOT override your
config.php.
2. Login using your old password. And once logged-in, scroll down to the configuration
section at the bottom of the page. You'll find an "upgrade buttonup" button. Click on that
and wait for the script to create new and upgrade the existing tables in the database.
3. After that, you're all ready to go!
B. Upgrading from ButtonUp 2.0 to ButtonUp 2.x
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Upload admin.php and functions.php. After that log-in and scroll down to the configuration
section. Click on "update tables" button.
C. Upgrading from ButtonUp 2.2 to ButtonUp 2.3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Upload ONLY functions.php. That's the only one that needs to be upgraded. After that,
everything's set.
=============
= index.php =
=============
1. Keep in mind that you should never ever remove the first line (the one with the
"include("functions.php")"). If you'll be moving index.php out of the folder where
the script is installed, you need to revise this line a bit to include the path
to the file functions.php. Example, I installed ButtonUp to the folder /links but i
want index.php to reside one folder above it. So I change "include("functions.php")"
to "include("links/functions.php")".
2. Next just place the line with "" where ever you want the
buttons to show up in your layout. More info about this line and customizing the
links displayed are available below.
3. And lastly, I'll be forever grateful if the line with the "powered by ButtonUp" will be left intact. Or at
least credit ButtonUp please. ^_^
============================
= =
============================
listalllinks(), in index.php, is the function that allows you to display your buttons.
And it will also control which buttons you want to display or not. You can use this line
more than once in index.php to display a different set of buttons.
Just using the line:
will work as is and will list all the buttons you've uploaded so far. But if you want to
play with it, below are the specific parameters that you could use.
A. Displaying A Specific Category Only
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you want to display just a specific set of buttons according to category, just place
the category name in between the parenthesis enclosed in quotes. For example, I have a
category for my affiliates which I named "myaffiliates". If I just want to display that set,
the line in my index.php would result into something like this:
B. Displaying All Categories Except For A Specific One
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you don't want to display a specific category but want all the others to be displayed,
place the category name you don't want to be displayed in between the parenthesis enclosed
in quotes, followed by a comma (,) and then the word false. For example, I want all
categories to be displayed except for the category "myaffiliates", the line in my index.php
should look something like this:
C. Not Linking Buttons With Their URL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you don't want to add a link to your buttons, just add the word false as the third parameter
inside the parenthesis. It should be the third parameter and not the second or the first. For
example, I have a category called "mybuttons" but I don't want it linked, the line in my
index.php should look something like this:
The "false" in that line indicates that I just want the buttons to show but not the links.
If I want to list all buttons but not their links:
As you can see, I have an empty category indicated by the two single quotes, "true" just to
indicate that all will be displayed and lastly, "false" to indicate that all buttons displayed
won't be linked to their url.
=========
= Usage =
=========
Uploading: Just select the button you'll upload, then add the url at the box beside
it. Urls can either be formatted as any of the following:
- http://site.com/
- site.com
- www.site.com
Then pick a category and an alt or title text. Also note, that only jpg
and gif buttons are accepted. No png and bmp buttons.
Deleting: To delete a button or buttons, click on the tickbox below the url link in
the admin page. Then click on delete links.
Editing: If you want to edit a button, just click on the button from the button list. The
details for the specific button will be displayed and you can edit the link, alt
tag and category. If you want to change the button, just click on browse and
upload the new button.