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
Module system with PHP
Old 12-12-2007, 01:27 AM Module system with PHP
The PHP Professor

Posts: 340
Name: Alex
Location: Behind You
Trades: 0
I want to create a module system for users on my site. I have a database set up already, but I am stumpped on how to display the modules on the users account page because each user can choose which module they want and users are also able to add modules to the system that others can use too.


This really confuses the hell out of me so can some one please help me with this. And if possible try not to just post ok I'd to google or what ever, actually post some code I'd possible.

Thanks all in Advance!
__________________
Go Kirby! <(" . "<) (^" . "^) (>" . ")> Talkupation!
microcolt is offline
Reply With Quote
View Public Profile Visit microcolt's homepage!
 
 
Register now for full access!
Old 12-12-2007, 04:15 AM Re: Module system with PHP
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
What *exactly* you cannot perform? Select data from database? Display it? Or you cannot think over how to organize all that sht?

I think that first of all you must decide how is your module presented in your system. Is it a single file with a single class inside or is it a set of files inside a directory?

Then you must decide how each module will interact with the framework. Is it included on start or is it included dynamicaly or is it a standalone script which can be called directly by user as an url on your server?

The framework should detect installed modules. How? Scan through the /modules/ dir and include() some file and call some $module->getname() method?

The framework should detect which of these modules are active for certain users. How? Should a module itself know about his users or should a user know about his modules or should the framework decide which modules are active for who?

The module should know its own settings for the certain users. How? Something like $module->confugure($settings), which are different for each user?

Are you sure that this task corresponds to your skill?
__________________

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

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 12-12-2007, 09:12 AM Re: Module system with PHP
The PHP Professor

Posts: 340
Name: Alex
Location: Behind You
Trades: 0
Here is what i want to do.

Each user has a profile page, on that page i want the modules that they have installed to there account displayed on there profile page. I am confused on how to show all the modules at once. Not only that but i want to know how to do it. Basically a user can create a module by entering the URL of the page for the module, so its kind of like displayed in an iframe. But how do i make it so that the modules are displayed based on what modules they have already, and new modules can be displayed once there entered into the database.
__________________
Go Kirby! <(" . "<) (^" . "^) (>" . ")> Talkupation!
microcolt is offline
Reply With Quote
View Public Profile Visit microcolt's homepage!
 
Old 12-17-2007, 06:12 AM Re: Module system with PHP
Experienced Talker

Posts: 30
Trades: 0
I guess just a simple while from a database where users are linked to modules?
klaroen is offline
Reply With Quote
View Public Profile
 
Old 12-19-2007, 08:24 AM Re: Module system with PHP
The PHP Professor

Posts: 340
Name: Alex
Location: Behind You
Trades: 0
Never mind, i figured an easy way to do it:

PHP Code:
 if ( isset ( $user_module ) )
{
preg_replace "#MODULE_NAME#"$module_contents );
}
else
{
return 
false;

__________________
Go Kirby! <(" . "<) (^" . "^) (>" . ")> Talkupation!
microcolt is offline
Reply With Quote
View Public Profile Visit microcolt's homepage!
 
Reply     « Reply to Module system with PHP
 

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.35870 seconds with 12 queries