jonnyquest
02-04-2006, 08:47 PM
Hi,
I need to create a module that will be used on a lot of different pages. On each of these pages, I want to be able to customize certain variables in this module. Rather than bury my variables in php code, I'd prefer to input these variables from the admincp as is done with the modules that ship with vBa. I've looked into the code and db structure and it appears that there are a set of default settings and than each page customizes these variables using some code that looks like: :{s:7:"varname";s:17:"portal_rss_iconid";s:10:"grouptitle";s:19:"adv_portal_rss_feed";s:5:"value";s:0:"";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:0:"";s:12:"displayorder";s:1:"7";s:5:"title";s:14:"Icon ID to use";s:11:"description";s:57:"Specify an optional Thread Icon ID to affix to the title.";}s:20:"portal_rss_cachepath";a:8:{
An example for clarification: I want to build a Moderators module. I want to put this on 6 different vBa pages. On each page, I want to pull the moderators from a specific forum. I'd like to be able to go into the Edit Page section and look for the Moderators module section where there is an input box for 'Forumid's to pull moderators from'. By changing this for each page, it would change the SQL that the php is using to pull the mods.
Nowhere on this site have I been able to find discussion about how to go about setting up the db and php so I can do this.
Any help:
I need to create a module that will be used on a lot of different pages. On each of these pages, I want to be able to customize certain variables in this module. Rather than bury my variables in php code, I'd prefer to input these variables from the admincp as is done with the modules that ship with vBa. I've looked into the code and db structure and it appears that there are a set of default settings and than each page customizes these variables using some code that looks like: :{s:7:"varname";s:17:"portal_rss_iconid";s:10:"grouptitle";s:19:"adv_portal_rss_feed";s:5:"value";s:0:"";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:0:"";s:12:"displayorder";s:1:"7";s:5:"title";s:14:"Icon ID to use";s:11:"description";s:57:"Specify an optional Thread Icon ID to affix to the title.";}s:20:"portal_rss_cachepath";a:8:{
An example for clarification: I want to build a Moderators module. I want to put this on 6 different vBa pages. On each page, I want to pull the moderators from a specific forum. I'd like to be able to go into the Edit Page section and look for the Moderators module section where there is an input box for 'Forumid's to pull moderators from'. By changing this for each page, it would change the SQL that the php is using to pull the mods.
Nowhere on this site have I been able to find discussion about how to go about setting up the db and php so I can do this.
Any help: