SA-MP Forums Archive
[Tool/Web/Other] Dynamic MySql Website! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Tools and Files (https://sampforum.blast.hk/forumdisplay.php?fid=82)
+---- Thread: [Tool/Web/Other] Dynamic MySql Website! (/showthread.php?tid=249301)

Pages: 1 2


Dynamic MySql Website! v3 Fixed - Rokzlive - 18.04.2011

This took me about 2 hours to do.

This is a dynamic website!

Features:
Dynamic: Sitename
Slogan
Copyright
About
3 Slides
Unlimited News Articles
Navigation Links
Non Dynamic: Permanent Information

Types (This is for the data in the mysql)
1 Website Name
2 Website Slogan
3 Website Copyright
4 Website About

How to install:
Extract the .zip to your webfolder.
Create a database in mysql.
Import database.sql
Edit config.php to correspond with your mysql information.

Edit the settings, slides, news, and navigation links in mysql!

And your done!

(I really rushed with making this thread so i may of skipped some things. If you want to write a better descripting / install guide for me, feel free.)

Live demo by kwarde: http://preview.rl-rp.com/DMW/ (Note, this demo is v3 Fix 2)

Dowload v3 FIX 2: http://solidfiles.com/d/3296c/
Download v3 FIXED: http://solidfiles.com/d/f6e3c/
Download v3: http://solidfiles.com/d/fd49/
Download v2: http://solidfiles.com/d/49870/
Download v1: http://solidfiles.com/d/a23b1/

Changelog:

v2:

Only connects to mysql once, and closes connection once all stats are loaded!
Database info is defined only in config.php.

v3:

Ability to add pages via mysql.
NOTICE: NEW SQL FILE!

v3 Fixed:

Pages can now have spaces in their name.
Navigation based on page id.

v3 Fixed 2:

Fixed bottom navigation bar.

Coming in v4:

User System.
Comment System.


Re: Dynamic MySql Website! - Ironboy - 18.04.2011

Nice work


Re: Dynamic MySql Website! - Calgon - 18.04.2011

This isn't a Filterscript or an Include, post in the appropriate forums next time (Data Files, Maps and Tools).


Re: Dynamic MySql Website! - BASITJALIL - 18.04.2011

Yeah Calg00ne is right
BTW its good


Re: Dynamic MySql Website! - royal_king - 18.04.2011

Nice one!


Re: Dynamic MySql Website! - iJumbo - 18.04.2011

yeah nice work


Re: Dynamic MySql Website! - Markx - 18.04.2011

Awesome dude! 100/10


Re: Dynamic MySql Website! - CODMW5 Owner - 19.04.2011

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 110 in /home/internat/public_html/index.php/index.php on line 16
Lost connection to MySQL server at 'reading initial communication packet', system error: 110

Can someone help me please...
http://internationalgaming.org/index.php/


Re: Dynamic MySql Website! - royal_king - 20.04.2011

Quote:
Originally Posted by CODMW5 Owner
Посмотреть сообщение
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 110 in /home/internat/public_html/index.php/index.php on line 16
Lost connection to MySQL server at 'reading initial communication packet', system error: 110

Can someone help me please...
http://internationalgaming.org/index.php/
This is your error
"Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /home/internat/public_html/index.php/index.php on line 16
Access denied for user 'root'@'localhost' (using password: YES"

Give MySQL Data Base details correctly, "root" is not the db username

got any doubt ask me at MSN - viswanath608@hotmail.com


Re: Dynamic MySql Website! - Ricop522 - 20.04.2011

Awesome


Re: Dynamic MySql Website! - Rokzlive - 20.04.2011

I might recode it to be a bit more organized.... lol.


Re: Dynamic MySql Website! - royal_king - 21.04.2011

Quote:
Originally Posted by Rokzlive
View Post
I might recode it to be a bit more organized.... lol.
lol it would be better if you recode to install it simply, now you need to give MySQL Db info at every line thats bit hard for beginners. It's better to make a file config.inc.php and make it more efficient with some new features will be nice (just a suggestion).


Re: Dynamic MySql Website! - Kwarde - 22.04.2011

It looks very nice. Except installing.
You could make one new $connection variable, or only connect once. You'd make ALOT connection, which is not needed - You could also make a configuration file.
However, if you want, you can add this to your main post; Preview of this script: http://preview.rl-rp.com/DMW/
Layout etc. are very nice!


Re: Dynamic MySql Website! - Rokzlive - 23.04.2011

I coded this in like 5 minutes... literally xD Im planning to make it much more efficient, but right now my wife and son are priority since i got a baby girl on her way in about 2 weeks.


EDIT


v2 Released!

Changes:

Only connects to mysql once, and closes connection once all stats are loaded!
Database info is defined only in config.php.

Coming in v3:

Ability to add pages via mysql.


Re: Dynamic MySql Website! - Rokzlive - 23.04.2011

v3 Released!

Changes:

Ability to add pages via mysql!

Coming in v4!

User system!


Re: Dynamic MySql Website! - Kwarde - 23.04.2011

The new update's nice, but there's a bug: When a page name has a space in it (the 'pagename'), it'll say "invalid page" when you go to it.


Re: Dynamic MySql Website! - Rokzlive - 23.04.2011

Ok, ill base pages of id only then. Gimme like 20 minutes (im eating lunch)


Re: Dynamic MySql Website! - Rokzlive - 23.04.2011

v3 Fixed is now released. Im planning on just saying screw the user system UNTIL i add a way to comment on the front page articles and internally added pages.


Re: Dynamic MySql Website! - Kwarde - 23.04.2011

That's a nice updated.
Script re-uploaded + "TestPage" changed to "Test Page" -> Working indeed
BTW Rokzlive, I've ever made a 'comment system'. I'll try to find it back.


Re: Dynamic MySql Website! - Rokzlive - 23.04.2011

v3 Fix 2 is out. The bottom navigation bar was not updating with the rest.