Firefox PHP

How to embed an Input text below the subject??

Posted by OzX 
OzX
How to embed an Input text below the subject??
December 07, 2009 06:10PM
hi
I'm creating a module for phorum, and I have the following problem.

I need to insert an input under the subject.
As shown in the picture below.



But without having to modify the original posting.tpl.
To enable or disable it from the administrator module.

Saludos¡
Re: How to embed an Input text below the subject??
December 07, 2009 06:31PM
If you take a look at the posting.tpl template file, you will see that the "tpl_editor_after_subject" hook is called at precisely that location. Thus you can use that hook to add your own html to the page at that spot.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
OzX
Re: How to embed an Input text below the subject??
December 07, 2009 06:58PM
Hi Joe Curia.
Thanks for your reply.
But still can not get it working.

For example, I have this modified Hello World module.

Language: PHP
<?php   // This is an example of a single file module for Phorum. Almost all // programming courses start out with building a program that displays // "Hello, world!" on screen. The Phorum developers have followed // the tradition and created "Hello, world!" for the Phorum module // system.   if(!defined("PHORUM")) return;   /* phorum module info title: Single file "Hello, world!" module desc: This is an example of a single file module. The module will display "Hello, world!" after displaying the page header. hook: after_header|phorum_mod_helloworld_after_header hook: tpl_editor_after_subject|phorum_test_editor_after_subject */   function phorum_mod_helloworld_after_header () { print "Hello!"; }   function phorum_test_editor_after_subject(){ print "How are you?"; }   ?>

Hello I shows, above the header, but can not display the "How are you?" below the subject.

What could be wrong?
Thanks for your help Joe Curia.
Re: How to embed an Input text below the subject??
December 07, 2009 07:08PM
After editing the module, did you revisit the Admin section? You do not need to disable/re-enable the module, but you do need to visit the admin section to see that the "Single file "Hello, world!" module" module has been updated. After you see that message, you should see the test message printed on the posting form.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
OzX
Re: How to embed an Input text below the subject??
December 07, 2009 07:12PM
It had a problem with the temporary files from linux. Php ~
Now it works perfect.
Thanks Joe. Especially for your patience.
Greetings
Sorry, only registered users may post in this forum.

Click here to login