Jump to content

Ttuorial


unidox

Recommended Posts

Is this your own CMS?  I've never done modules before but assuming you have the pages stored in a table somehow each with a unique id, you could create a second table to store module instances for when you create a new module to be used on a page.  Each row in the instance table could have a unique_id, and a  reference to the page you want to include it on...like the id from the pages table and perhaps a path to the script that would run the module.  Then on each page, in the column where the modules would go do a select query to check for modules on that page, using the page id which you must've used somewhere earlier on the page to display your contents.  Then while looping through the results just include the path to the script from the database.  I dunno..something like that would work I think. 

Link to comment
https://forums.phpfreaks.com/topic/60864-ttuorial/#findComment-302910
Share on other sites

Yes, it is my own cms...

 

Well, I asked a friend and I was just wondering if this would work...

 

I wrote it up right now, and its 2 in the morning, so if the code is bad, please help.

 

Use a table and in the admin define a number 1 for left, 2 for right

 

$block1 = "Block #1";
$block2 = "Block #2";
$block3 = "Block #3";

If {
$block1 == "1";
print "$block1";

}ifelse{

$block2 == "2";
print "$block2";

}ifelse{

$block3 == "3";
print "$block3";

 

Not sure if I typed that in right. I wonder if that will work

Link to comment
https://forums.phpfreaks.com/topic/60864-ttuorial/#findComment-303148
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.