Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
How can I do this?????
Old 07-02-2006, 08:10 AM How can I do this?????
atomicshockwave's Avatar
Experienced Talker

Posts: 38
Trades: 0
Hi I need a little help,

normaly I am verry good at just looking at a page of code and re-creating it. but this is difrent.

I downloaded the vanilla 1 forum, and LOVE how the system works for addons, just drop them in the folder and check/uncheck the box to install/un-install. I would love to re-create something like this for my site, would anyone out there be willing to help me figure out how?

thanks
atomicshockwave is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-02-2006, 08:25 AM Re: How can I do this?????
Ultra Talker

Posts: 251
Location: Belgium, Antwerp, Zoersel
Trades: 0
Ok, here's how I would do it:

When visiting the plugin management page, scan the plugin directory. Add all new plugins to the database with an 'installed' field' marked as 'not installed' (can be a bool or something). Also check that all plugins in the database are real plugins, so that you can just delete the plugin, without disturbing the script.

Then make it possible for the user to change the installed status of a plugin by checking the checkbox.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by Orodreth; 07-02-2006 at 10:01 AM..
Orodreth is offline
Reply With Quote
View Public Profile Visit Orodreth's homepage!
 
Old 07-02-2006, 08:33 AM Re: How can I do this?????
atomicshockwave's Avatar
Experienced Talker

Posts: 38
Trades: 0
good ideas, but how dose vinilla know where to put the add ons?
like to create an icon in the coment, verses a link for an rss feed on the sidebar?
I dont think a basic php include could do that, could it?
atomicshockwave is offline
Reply With Quote
View Public Profile
 
Old 07-02-2006, 09:52 AM Re: How can I do this?????
stOx's Avatar
Machine

Latest Blog Post:
Worlds Smallest Car - Peel P50
Posts: 2,111
Name: Matt. (>',')>
Location: London, England.
Trades: 0
The install file probably has a bunch of instructions in it then the forum uses str_replace() to make the appropriate changes to the files.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
stOx is offline
Reply With Quote
View Public Profile Visit stOx's homepage!
 
Old 07-02-2006, 10:02 AM Re: How can I do this?????
Ultra Talker

Posts: 251
Location: Belgium, Antwerp, Zoersel
Trades: 0
If stOx is right, a basic include should do the job.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by Orodreth; 07-02-2006 at 10:05 AM..
Orodreth is offline
Reply With Quote
View Public Profile Visit Orodreth's homepage!
 
Old 07-03-2006, 11:08 PM Re: How can I do this?????
reli4nt's Avatar
Extreme Talker

Posts: 168
Location: New York
Trades: 0
a database simplifies it.

Imagine the navigation calls an include for each item it finds in a table of the database. This way any plugin you install or unistall or have yet to create will be relected in the navigation.
__________________

Please login or register to view this content. Registration is FREE

Designing the world we live in.
Defining the terms we live by.
reli4nt is offline
Reply With Quote
View Public Profile Visit reli4nt's homepage!
 
Old 07-04-2006, 06:21 PM Re: How can I do this?????
atomicshockwave's Avatar
Experienced Talker

Posts: 38
Trades: 0
I thought aboyt using a sql database, but I am trying to stay away from sql for 2 reasons, 1- i dont know how to create a sql database table. and 2- my project requires that the files in my project can upload to a server ande it just work. IF not for my second reason I would just learn sql realy quick, because it would seam the best answer.

Unless you know a way to let a php script auto creat a database table? that would be great!
atomicshockwave is offline
Reply With Quote
View Public Profile
 
Old 07-04-2006, 08:15 PM Re: How can I do this?????
Ultra Talker

Posts: 251
Location: Belgium, Antwerp, Zoersel
Trades: 0
Auto create table:

PHP Code:
mysql_query(
  
"CREATE TABLE plugins (
     id INT(3) NOT NULL AUTO_INCREMENT,
     PluginPath VARCHAR(255),
     PluginName VARCHAR(100),
     Description TEXT,
     PRIMARY KEY  (id)
   )"

Adapt the fields to your needs of course. I don't see why you'd need to create separate tables for your plugins however.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by Orodreth; 07-04-2006 at 08:16 PM..
Orodreth is offline
Reply With Quote
View Public Profile Visit Orodreth's homepage!
 
Old 07-11-2006, 05:37 PM Re: How can I do this?????
atomicshockwave's Avatar
Experienced Talker

Posts: 38
Trades: 0
thank you sooooooo much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
atomicshockwave is offline
Reply With Quote
View Public Profile
 
Old 07-11-2006, 05:57 PM Re: How can I do this?????
reli4nt's Avatar
Extreme Talker

Posts: 168
Location: New York
Trades: 0
i would add in
Code:
`active` ENUM('0','1') NOT NULL DEFAULT '0'
This way you can turn on and off installed plug ins
__________________

Please login or register to view this content. Registration is FREE

Designing the world we live in.
Defining the terms we live by.
reli4nt is offline
Reply With Quote
View Public Profile Visit reli4nt's homepage!
 
Old 07-11-2006, 06:18 PM Re: How can I do this?????
atomicshockwave's Avatar
Experienced Talker

Posts: 38
Trades: 0
how would I go about adding deleting info from the database? like i said before I dont relay know sql. I think I know how to add info to a table. but how do you delete?
atomicshockwave is offline
Reply With Quote
View Public Profile
 
Old 07-11-2006, 11:17 PM Re: How can I do this?????
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
If you want to delete a row:

DELETE FROM table WHERE field = value

If you just want to delete certain fields:

UPDATE table SET field = NULL WHERE field = value
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How can I do this?????
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.36233 seconds with 12 queries