Création d'un fanlisting

HTML5, CSS3, Javascript, support des mobiles... Que penser de votre site ? Vous manquez d'informations pour la construction d'un site qui puisse s'afficher correctement partout ? C'est un problème simple, un peu complexe ? Venez ici !
FateGlimpse~;
Arias
Messages : 6
Inscription : 06 mars 2005, 11:19

Création d'un fanlisting

Message par FateGlimpse~; »

Voilà, je veux un créer fanlisting.
J'ai télécharger un truc permettant d'en créer un. J'ai le Readme, mais comme c'est premier pas en php, c'est assez chaud.

Voilà les instructions de Readme:

-----> HOW TO INSTALL THE SCRIPT

1. Log into your domain's control panel and create a new database called members (or whatever
you like, really) Then, either create a new user, or give an existing user access to the
database. You will need the SELECT, INSERT, UPDATE, DELETE and CREATE privileges.

2. Extract the zip file to your desktop

3. Open config.php in a text editor such as Notepad or CuteHTML and edit all of the variables.

4. Upload all the files to the same directory your fanlisting is in.

6. Load the uploaded create.php file in your browser. You should get a 'Success! Tables
created.' message but if not, please re-check all of the information in config.php. It means your database details are incorrect.

7. Delete create.php from your server to avoid security risks.

8. Load the uploaded admin.php file in your browser and log in with the password chosen
in config.php.

9. That's it! You may now begin approving members for your fanlisting. :) Don't
forget that you can edit header.inc, footer.inc and style.css to your heart's content.
When someone has joined your fanlisting, login to admin.php to approve them. When someone sends in an Updated Information form, login to admin.php and go to the Edit Members page. Use the search form to find your member in the database. You don't have to fill in all the fields, just one or two will usually find your member. Then change their details and click the Submit button to submit the changes.

11. You can now display the date your fanlisting was last updated (ie, you approved or edited a member). I strongly recommend doing this, as it is now a rule at TheFanlistings.org. If your site does not display a Last Updated date, your fanlisting is at the risk of being put on the Troubles list.
However, with this small bit of coding, the date is updated automatically every time you update the fanlisting. :) Insert the following into your page (which must have a .php extension):

<?
include("config.php");
$query="SELECT * FROM $table_u";
$result=mysql_query($query);
$num=mysql_numrows($result);
$i=0;
while ($i < $num) {
$last=mysql_result($result,$i,"date");
?>
<p>This fanlisting was last updated on <?=$last?>.</p>
<? ++$i; } ?>

10. You can display the total member count on the index page of your fanlisting by including the following bit of coding (your page must have a .php extension for this to work!!):

<? include("config.php");
$query="SELECT * FROM $table WHERE apr='y'";
$result=mysql_query($query);
$num=mysql_numrows($result);
?> <p>We have a total of <b><?=$num?></b> members!</p>

If you wish to display the number of Pending Fans (unapproved members), use the following:
<? include("config.php");
$query2="SELECT * FROM $table WHERE apr!='y'";
$result2=mysql_query($query2);
$num2=mysql_numrows($result2);
?> <p>We have a total of <b><?=$num2?></b> pending <? if ($num2 == "1"){ ?>member<? } else { ?>members<? } ?>!</p>


-----> ADDITIONAL NOTES
- You can use this script for more than one fanlisting. The only thing you need to change for that, is the name of the table this script will use. Open up config.php in a text editor, and change the table name from "fanlisting" to whatever you want to. That's all! :)

- If you want to use already existing header and footer files, simply delete header.inc and footer.inc from your server and change the path in the config.php file to read /home/yourdomain/public_html/header.inc as opposed to just header.inc (replace the /home/yourdomain/public_html bit with the absolute path to your site). Alternatively, you can just edit header.inc and footer.inc to match your current header and footer. The last method is recommended.

- The Comments field is the only field that will be entered into the database, but will not show up on the member list. You can use this field for anything you like if you don't want to receive comments. Whatever is entered into this field will be in the database and visible for you in the Admin Panel, but not for anyone browsing the member list. Feel free to open up join.php in a text editor and change the description of the field from "Any comments/Questions?" to anything you like.

- Feel free to rename the index.php and admin.php files but make sure they remain in the same
folder as the config.php file.

- The Country list on the members.php page extracts all distinct countries from the database. That means that if someone joins with USA as their country and someone joins with U.S.A and someone with United States, they will be listed as 3 different countries. Because the Country list now is a dropdown, people won't be able to put in different names for countries anymore. However, if you are converting an already existing member list to PHPFanBase, chances are you'll have a few duplicate countries in there that are spelled differently. The only way to solve this, is to go into phpMyAdmin, click on the SQL tab, and paste the following into the text box:

UPDATE table SET country = "USA" WHERE country = "U.S.A.";

Be sure to change the table to the name of your table. You can run this as many times as you want, for as many different countries as you need to update. Just remember the first country instance will replace the second one. In this example, all instances of U.S.A. in your database will be replaced with USA.

- If your fanlisting already has a whole bunch of members, you will need to add these to your database. There are 3 different ways in which you can do this. (Please note, if you want to convert from Megabook, scroll down!)
#1. Fill out a Join form for each member, and then approve them in the Admin Panel. All members will get an email notifying them they have been added, please note that this might be confusing if they joined a while back.
#2. You can go into PHPMyAdmin, and add them to the table there by choosing "Insert New Row". This is not recommended if you do not know how to use PHPMyAdmin. If you choose this method, please remember to put a "y" in the apr field.
#3. You can use the batchmembers.php file included in the download. Open it up in a text editor such as Notepad or CuteHTML and add all your member's information according to the format shown. Make sure there are no quotation marks (" and ') in any of the information you add though, otherwise it will come up with a parse error. You have to escape all " and ' by changing them to \" and \'. After you've successfully ran batchmembers.php, DELETE the file off your server!! Anyone can run it, so by leaving it there, you run the risk of some idiot running it multiple times and duplicating all your members, which basically ruins your database.

-----> MEGABOOK CONVERSION TUTORIAL
Written by Naddy (naddy@spiritcrow.net).

In Megabook's Layout Templates area is a field called "Entry Layout" which determines what the Entry itself, name, country and so on will look like on the page. What you have to do here is to enter the following (of course based on the variables you use - var1 in my case is country)

('', '[name]', '[email]', '[url]', '[var1]', '','n','y'),
<br>
Then you simply cut and paste what you get on the html page (not the source code, the actual text you see on the site) into the correct spot in the batchmembers.php file, checking for right spelling and everything, then run the file. It worked like a charm for me!

-----> CHANGELOG
Version 2.1:
-several bug fixes

Version 2:
-Improved Admin Panel (check site link added)
-New (and hopefully better) Login System for the Admin Panel
-Member Pages displayed in tables instead of Lists tags
-Member IDs all formatted as ### (ie 268 or 003)
-Email addresses on the member lists are protected from Spam by Javascript
-Option to turn off notification of new members joining
-Option to turn off notifications sent to members when they've been approved
-The Comments field has been added to the database
-The Country List now shows the number of fans in that country next to the country name
-Update Info form was added to allow users to email you with information they want updated
-Join form now checks if someone is already listed before adding them to the database. If they are, an error message is displayed and they are asked to fill out the Update form if they want to update their info.
-The Join form has the Countries in a dropdown list, to ensure people can't misspell their country's name or fill in a city.
-Option to sort the member and country pages by ID, name or country
-Link to Admin Panel added to the notification emails sent to you
-Hide Email option has been added. If a member opts to hide their email address, it will be visible in the Admin Panel, but not on the site. You will also be able to contact them using the Email All function.
-Small Javascript disables anyone from sending in the Join or Update form several times in a row.
-A tutorial was added to make conversion from Megabook to PHPFanBase painless.
-Easily insert an automatic Last Update date.
-Smart text display (fan if there's one, fans if there are more) on the member and country pages.
-Credit Link added to the Join and Member pages.



Donc, pour l'instant, je bloque à la premiere étape, j'ai accedé à ma base de données sur Free, et là je sais pas trop exactement ce qu'il faut faire. Si vous pouviez m'expliquer, ce serait sympa. :)
jv2759
Tyrannosaurus Rex
Messages : 4161
Inscription : 12 févr. 2004, 14:29

Message par jv2759 »

J'ai pas tout lut, trop la flegme de tout lire, mais le peux que j'ai lut. Il faut éditer le fichier config.php et éditer dans ce dernier l'ensemble des variable lier à la base de donner.

Normalement ce sont les valeur :

host / login / port / passwd / nom de la base de donner, qu'il faut éditer.

Ensuite tu lance create.php et si tu as success alors c'est bon...

La tu pouras lancer admin.php pour configurer le tout...


Maintenant moi je te conseil de faire un tour ici :

http://www.phpscripts-fr.net/

Et de regarder si tu n'aurais pas des scripte qui marcherais sans base de donnée, car je ne pense pas que dans ton cas ce soit une obligation, surtout que cela complique l'installation...
Inscrit sur la liste des abonner absent...
Répondre

Qui est en ligne ?

Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 2 invités