Jump to content

forum mod system?


blueman378

Recommended Posts

play with this your get the idear ok.....

 

<?php

$rec['clock']="off";//databse result.......


$rec['date']="on";//databse result.......


if($rec['clock']=="on"){

echo "<h1> Current time! <br> ".date("h:i:s" , time())." </h1>";
}

if($rec['date']=="off"){

echo "<h1> Current date! <br> ".date("d-m-y" , time())." </h1>";
}

?>

 

 

 

all you do is use a new table column  as 'off' or 'on'

 

anythink you want on just update the database via a button or link insert on or off

 

example above but your be using a database.................

 

 

i think using a page for the design off your mod and using a include would be better,

becouse you might want to add more modications to the mod..........

Link to comment
https://forums.phpfreaks.com/topic/133771-forum-mod-system/#findComment-696723
Share on other sites

Usually the software will have a folder called addons or whatever and you would put your addon script in there and the forum software will check what's in there.  The forum software will also provide an interface for addons to use: a list of publicly available properties and methods.  The people who make addons would be expected to include certain "tags" in their code, so that the forum software can properly install it.  It looks into the addon folder, identifies an addon by a specific "config" filename that's in a specific format, opens the file, reads lines of code that specify what is supposed to be added where (like for instance, if you were wanting to add a new option on the "Home Help Search ..." tab). 

 

Then your addon script would use the available properties and methods (variables and functions) for doing whatever you want it to do.  How many and what colors there are to color with is dependent on what the forum software people thought to include in the box.  Or another way to put it: the forum software hands you xyz ingredients and you can mix and match them any way you like, and maybe you'll come up with some new dish they haven't included.  But you're limited to whatever ingredients they give you.  Those are the easiest mods to do.  You use what's provided, do it in their format, put it in the folder, and the forum software will take care of the rest. 

 

Then there's the type of mods that involve changing that interface.  Let's say for instance, you want to make a mod as described above, but you're lacking a certain ingredient to bake that cake.  Maybe it's one number from a certain query that the forum devs didn't think to include in their interface for you.  So you hack the interface scripts to pull that data from the database and list it among the available ingredients and otherwise go about your business.  What exactly is involved in doing that, varies from software to software, obviously.  A really good forum software might give you an interface for even that, or at least instructions on what to add and where.

 

Then there's the type of mods that are more like straight hacks, where you go in and alter, add, remove things that can't easily be put into an interface.  Maybe you're fixing some bug with sessions.  Maybe you're adding an entire system that the dev team somehow managed to forget, like a PM system. 

 

Ideally, forum devs want to keep mod making at that first level.  Realistically, it's usually at the 2nd level.  They try the hardest to keep it from the 3rd level, because that's the sort of stuff that can give you a bad rep or have your script stolen. 

Link to comment
https://forums.phpfreaks.com/topic/133771-forum-mod-system/#findComment-696980
Share on other sites

Both SMF and Phpbb3 (and a lot of other existing forum scripts) are open source. Why not just download one or more and examine how it does what you are asking to find the answers to your existing and future as yet unasked questions on how they implement any specific feature.

Link to comment
https://forums.phpfreaks.com/topic/133771-forum-mod-system/#findComment-697004
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.