Logician,
I hate to bother you for that, but I tried to do it alone, and failed miserably. I have no experience with php, so it's hard for me.
What would make this hack perfect (at least for me), would be to have an additional parameter in AdminCP, Dynamic Forum Announcements, right below the Forum Home Table Announcement and before Forum Home PopUp Announcement. Let's say we call it "display_homeonly". This should be a Yes/No parameter.
Then, inside the templates, one could add something like:
For FORUMHOME:
<if $vboptions[display_homeonly]="Yes">
$dfh_announcement
</if>
For other templates:
<if $vboptions[display_homeonly]="No">
$dfh_announcement
</if>
In that way, the table announcement could be either viewable in the forum home, or in every page of the site, depending on the AdminCP parameter.
My problems are:
- How do you add such a parameter in AdminCP? I can replicate the steps you describe in the installation file, for the dynamic_fha, but I do not know what Option Code to use for this one, obviously it's not a textarea.
- What shall I add in global.php to read it from the database? I assume something like $display_homeonly=$vboptions[display_homeonly] is needed. Am I correct? Or can I check $vboptions[display_homeonly] directly from the templates?
I am sure I'll be able to manage the templates <if> structure from there on.
Again, sorry if this is way beyong your role here, I just can't find any place to read about these issues. If you could guide me somewhere, I would appreciate it.
Kind regards and again, many thanks for THE most useful hack.
----------
John
|