StewardManscat
07-14-2004, 12:26 AM
New to vb and vbadvanced, I have not grokked in fullness.
I'd like the coming events to appear in a little block on my main cmps page.
1. I find code in index.php for querying the databse...
// ### TODAY'S EVENTS #################################################
if ($vboptions['showevents'])
{
... here is the block of code I will steal
}
2. I paste that code snippet into a file by itself, surround it with php markers and save it in the modules directory as ComingEvents.php
3. Similary with templates: I steal a snippet of template code for coming events out of the FORUMHOME template. I create a new template called adv_portal_comingevents.
4. I add my new module in the admin panel. File to include: ComingEvents.php
No output. My cigar remains unlit. Not sure if I am totally out to lunch, or just a hairsbreadth away from what I want.
Looking at the prefabricated modules, I guess I need to add a line at the end of the module to evaluate the template. Such as:
eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_comingevents') . '";');
Now I am stumped because I don't know what 'modid' and 'content' are (or should be).
I understand this is a vague question. I cannot seem to wrap my head around the basic mechanisms here. Just hoping someone can follow my reasoning and suggest where I took the wrong turn.
Many thanks in advance.
I'd like the coming events to appear in a little block on my main cmps page.
1. I find code in index.php for querying the databse...
// ### TODAY'S EVENTS #################################################
if ($vboptions['showevents'])
{
... here is the block of code I will steal
}
2. I paste that code snippet into a file by itself, surround it with php markers and save it in the modules directory as ComingEvents.php
3. Similary with templates: I steal a snippet of template code for coming events out of the FORUMHOME template. I create a new template called adv_portal_comingevents.
4. I add my new module in the admin panel. File to include: ComingEvents.php
No output. My cigar remains unlit. Not sure if I am totally out to lunch, or just a hairsbreadth away from what I want.
Looking at the prefabricated modules, I guess I need to add a line at the end of the module to evaluate the template. Such as:
eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_comingevents') . '";');
Now I am stumped because I don't know what 'modid' and 'content' are (or should be).
I understand this is a vague question. I cannot seem to wrap my head around the basic mechanisms here. Just hoping someone can follow my reasoning and suggest where I took the wrong turn.
Many thanks in advance.