1
pmhoran
weBlog V. 1.30 from Hiro Sakai
  • 2005/2/18 14:00

  • pmhoran

  • Not too shy to talk

  • Posts: 115

  • Since: 2003/2/21


I downloaded on Feb 6th 2005 the weBlog Version 1.30 from Hiro Sakai

In the Post feature I found the checkbox for Private was duplicated and the Disable html checkbox was missing all together.

To fix this ... I went to the post.php and edited out 1 line.

At about line 233 you will see
Quote:
// options check box
$checkbox_tray = new XoopsFormElementTray(_BL_OPTIONS ,'
');
$checkbox = new XoopsFormCheckBox('', 'nohtml', !$entry->doHtml());
$checkbox->addOption('nohtml', _BL_DISABLEHTML);
$checkbox_tray->addElement($checkbox);
$checkbox = new XoopsFormCheckBox('', 'private', $entry->isPrivate());
$checkbox->addOption('private', _BL_PRIVATE);
$checkbox_tray->addElement($checkbox);
$blog_form->addElement($checkbox_tray);


I changed it to ...
Quote:
// options check box
$checkbox_tray = new XoopsFormElementTray(_BL_OPTIONS ,'
');
$checkbox = new XoopsFormCheckBox('', 'nohtml', $entry->doHtml());
$checkbox->addOption('nohtml', _BL_DISABLEHTML);
$checkbox_tray->addElement($checkbox);
$checkbox = new XoopsFormCheckBox('', 'private', $entry->isPrivate());
$checkbox->addOption('private', _BL_PRIVATE);
// $checkbox_tray->addElement($checkbox);
$blog_form->addElement($checkbox_tray);


and it seems to work OK and the Private checkbox shows only once. Still haven't figured out how to get the No Html box to show up too ... but its registered as checked so I guess its okay. It all seems to work OK.

on line 235 that reads
Quote:
$checkbox = new XoopsFormCheckBox('', 'nohtml', !$entry->doHtml());


that appears where is assigned if the checkbox is automatically checked off or not. If you want the box(es) checked off automatically ... leave as is. If you want the box(es) blank so the poster has to check for Private ... then remove the ! in front of "$entry->doHtml".

I am NOT really familiar with php ... but I wanted this to work right and just futzed with it trying different things ... and this is what seems to work.

Peter

Login

Who's Online

138 user(s) are online (99 user(s) are browsing Support Forums)


Members: 0


Guests: 138


more...

Donat-O-Meter

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

Latest GitHub Commits