4
I did it. I did it.
I figured it out.
twas real simple.
Brief background:
I wanted to make a Theme Control Panel based on Mtechnik (phpnuke) Theme control panel.
It lets you add up to 5 links and 3 messages through an admin area. The messages are a cross browser supported script. All displayed in theme.
I was having much trouble getting the theme.html to call the DB. The admin module side was no problem.
After weeks, nay, over a month of being stumped at not only this project but several others, it hit me like a ton o bricks. BRACKETS. Stupid little brackets. XOOPS needs them, XOOPS loves them, XOOPS is the Best.
<{php}><{/php}>
Example of calling db through theme.html
Quote:
<{php}>
global $xoopsDB;
$result = $xoopsDB->query("SELECT msg1 FROM ".$xoopsDB->prefix("archthemecp")." ");
list($msg1) = $xoopsDB->fetchRow($result);
echo $msg1;
<{/php}>
Is there a more compact way of writing this?
I am 90% finished with the ArchTheme Control Panel for XOOPS and will release version 1.0 this weekend.
I am modifying the default themes that come with XOOPS to utilize the theme control panel and they will be packaged with module. I will make a block to also display links.
You can see a working example at:
http://archangelartifacts.comThe messages and links below the logo are being drawn from the DB and are changed through the admin module.
I have put off finishing several themes til I figured this out. All future themes from AAINC will utilize this Control panel.
Be on the lookout for the ArchTheme Control Panel.
Coming to a Downloads section near you.
AAINC
ToDo:
Public Broadcast Message (sorta like phpnuke has) for admin to send a message to group specific.
TOP SECRET IDEA based on ancient chinese secret.
STUPID BRACKETS!!!!!