1
wrtbooks
how to add text on a module page?
  • 2004/1/3 1:44

  • wrtbooks

  • Just popping in

  • Posts: 77

  • Since: 2003/3/8 1


I am using XOOPS 1.3.x and I want to add some text and images above the contact form. I am not sure what file to add the text to and where? I know it would be in the 'Contact' module folder! theres a header.php and index.php hmm can anyone help with this simple question? asap

2
CBlue
Re: how to add text on a module page?

I'm not familiar with 1.3x of XOOPS but maybe it's template manager is similar to XOOPS 2x. If you have a templates manager, look for the contact template in it. There is only one template in my version of XOOPS (2.0.5.1), called contact_contactusform.html. If you have a cloned copy of your default template you can edit it.

This is what it looks like:

<{$contactform.javascript}>
<form name="<{$contactform.name}>" action="<{$contactform.action}>" method="<{$contactform.method}>" <{$contactform.extra}>>
<table class="outer" cellspacing="1">
<tr>
<th colspan="2"><{$contactform.title}></th>
</tr>
<!-- start of form elements loop -->
<{foreach item=element from=$contactform.elements}>
<{if $element.hidden != true}>
<tr>
<td class="head"><{$element.caption}></td>
<td class="<{cycle values="even,odd"}>"><{$element.body}></td>
</tr>
<{else}>
<{$element.body}>
<{/if}>
<{/foreach}>
<!-- end of form elements loop -->
</table>
</form>

Just put what you what at the very top above the <{$contactform.javascript}> and see if that works.

If you don't have this template at all, then try index.php but you really should add your extra stuff into the html template for modules if possible.

3
wrtbooks
Re: how to add text on a module page?
  • 2004/1/3 18:34

  • wrtbooks

  • Just popping in

  • Posts: 77

  • Since: 2003/3/8 1


Quote:
If you don't have this template at all, then try index.php but you really should add your extra stuff into the html template for modules if possible.

The template setup is for XOOPS 2.x not XOOPS 1.x

How would I add the text to the index.php page? where? anyone familar with this, there must be?

4
wrtbooks
Re: how to add text on a module page?
  • 2004/1/3 22:50

  • wrtbooks

  • Just popping in

  • Posts: 77

  • Since: 2003/3/8 1


anybody?

5
wrtbooks
Re: how to add text on a module page?
  • 2004/1/3 22:53

  • wrtbooks

  • Just popping in

  • Posts: 77

  • Since: 2003/3/8 1


Quote:
include("header.php");
if ( empty($HTTP_POST_VARS['submit']) ) {
if($xoopsConfig['startpage'] == "contact"){
$xoopsOption['show_rblock'] =1;
include(XOOPS_ROOT_PATH."/header.php");
make_cblock();
echo "<br />";
} else {
$xoopsOption['show_rblock'] =0;
include(XOOPS_ROOT_PATH."/header.php");
echo "<br />put text and html code here";
}
OpenTable();
include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
$company_v = "";
$name_v = !empty($xoopsUser) ? $xoopsUser->getVar("uname", "E") : "";
$email_v = !empty($xoopsUser) ? $xoopsUser->getVar("email", "E") : "";
$url_v = !empty($xoopsUser) ? $xoopsUser->getVar("url", "E") : "";
$icq_v = !empty($xoopsUser) ? $xoopsUser->getVar("user_icq", "E") : "";
$location_v = !empty($xoopsUser) ? $xoopsUser->getVar("user_from", "E") : "";

I played with the php code and found if I added an:
echo "<br />put text and html code here";
that it would display the text. I hope this helps someone else.

edit: this is the index.php page for the contact module btw.

6
wrtbooks
Re: how to add text on a module page?
  • 2004/1/3 23:21

  • wrtbooks

  • Just popping in

  • Posts: 77

  • Since: 2003/3/8 1


Just in case you are intrested here is the code I put in the index.php I decided to have an image show above the contact form:

Quote:
} else {
$xoopsOption['show_rblock'] =0;
include(XOOPS_ROOT_PATH."/header.php");
echo "<br /><center><img src='http://www.sermonindex.net/modules/contact/contact.gif'>
</center><br /><br />";
}
OpenTable();
include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
$company_v = "";


and here is the contact page to see the results:
http://www.sermonindex.net/modules/contact/

kewl eh! wow it took awhile but I am getting the hang of this.. man opensource rocks.. 2 cheers for xoopy

7
CBlue
Re: how to add text on a module page?

Looking good!

8
svaha
Re: how to add text on a module page?
  • 2004/1/4 0:04

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


Very nice wrtbooks, just a few minutes ago I looked at my own contact form and thought :"I'll have to change this".
Thank you for the idea.

Aloha

Login

Who's Online

194 user(s) are online (128 user(s) are browsing Support Forums)


Members: 0


Guests: 194


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits