Fork me on GitHub

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $10.00
Net Balance: $9.41
Left to go: $90.59

Donations
Dante7237  ($10)Oct-30

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

How do I...

get modules in XOOPS 2.0.14?

Answer here!

Did you know ?

There are many support sites in different languages across the world?

More details...

Random question

Can someone point me to the direction of how to make a page like the initial homepage on xoops.org?

I am making a site where I want a static block on the top of every page and the initial home page should be the last couple news items.

I haven't quite gotten the knack for how this all works so a tutorial on how to add basic content would be great! I have the news module as well as smartsecion and neither of them are real obvious how to do this.

I want a nice clean home page like is here on this site.

Answer here!

Recent Q&A List

Cumulus Tag Cloud

- 2 2.5 2.6 4 6 adslight Android AntiHarvesting AntiSpam API Apple Battlefield billige Blocks Bootstrap Captcha cell cent chronolabs CHUNG content CĂN demo docek download Dresses evden eve facebook Fat floor for free Gateway Google Guide herre Honeypot HP html5 Human HỘ IP iPhone jQuery Language Legal List log Loss module modules Monster new newbb news NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher Rapid RESIDENCE responsive review Rights rmcommon Room security Sentry site Smartphone Smarty Spam stem Studio support tag tdmcreate template The Theme themes User userlog web weight xoops Xortify XPayment ZendFramework

New Users

Registering user

# 137872

ode64de

Welcome to XOOPS!
SmartFAQ is developed by The SmartFactory (http://www.smartfactory.ca), a division of InBox Solutions (http://www.inboxsolutions.net)

Question
How to make xoopsformhidden xhtml-valid?
Answer
Remark: I don't know if this is really a FAQ. But this one disturbed me when making my page xhtml-valid.

There are two possible solutions. 1. make a tray with another formelement inside a module or 2. make the change systemwide which is much easier for the non-php-techie.

Look for function render in include/xoopsform/xoopsformhidden.php and the line which reads:

return "<input type='hidden' name='".$this->getName()."' id='".$this->getName()."' value='".$this->getValue()."' />";


Problem with this code is, that the input-field for hidden will inserted between the tr-lines of the table which is not xhtml-valid.

Just change the above line to:

return "<tr style='display:none;'><td colspan='2' style='display:none;'><input type='hidden' name='".$this->getName()."' id='".$this->getName()."' value='".$this->getValue()."' /></td></tr>";


What I did was just inserting another table-row. To prevent the new table-row from being displayed I used the style display:none.

That is all!

Requested and Answered by Anonymous on 2005/6/8 0:59:19 (3890 reads) 2 Comment(s) Print Q&A Send Q&A

The comments are owned by the author. We aren't responsible for their content.
I had the same validation problem.

I made this update un the render function but these function seems to be used in (a least one) other places.

With this modification, when you want to update a module (after a template modification), the update and cancel buttons are placed just under the header...
Published: 2006/4/17 11:22 • Updated: 2006/4/17 11:22
Hi all, I've finally found another solution (thanks to an xoops-france member)...

There is no need modifying formhidden.

First, just modify the file class/themeform.php and replace
} else {
    
$ret .= $ele->render()."n";
}

by
} else {
    
$hiddens .= $ele->render()."n";
}


and the replace just after this line
$ret .= "</table></form>n";

by
$ret .= "</table>".$hiddens."</form>n";


The function render() will now produce an html valid form.

For the contact module, there is another modification. Indeed, there is no need for a simple form to use a template, XOOPS can do it perfectly well. So in the file modules/contact/index.php comment the above two lines
...
$xoopsOption['template_main'] = 'contact_contactusform.html';
...
$contact_form->assign($xoopsTpl);


and then add the following line to the modules/contact/contactform.php
$contact_form->display();

after the last $contact_form->addElement

That's done, you will now have a valid html contact form.
Published: 2006/4/19 10:03 • Updated: 2006/4/19 10:03