1
andycleff
AMS Submit Template
  • 2005/6/9 19:20

  • andycleff

  • Not too shy to talk

  • Posts: 108

  • Since: 2005/4/29


I want to change the default option on the "Submit Article" form from:

Publish in Home?->Yes
to:

Publish in Home? -> No

Can't find which file handles the form.

So I can adjust the code:
$change_radio = new XoopsFormRadio(_AMS_NW_MAJOR, 'change',
$value_of_default);

2
andycleff
Re: AMS Submit Template
  • 2005/6/9 19:28

  • andycleff

  • Not too shy to talk

  • Posts: 108

  • Since: 2005/4/29


Ok, I found includes/storyform.inc.php

and this area:

//TODO: Check that pubinhome is 0 = no and 1 = yes (currently vice versa)
$sform->addElement(new XoopsFormRadioYN(_AMS_AM_PUBINHOME, 'ihome', $story->ihome(), _NO, _YES));

But not sure how to change the defaut value...

3
andycleff
Re: AMS Submit Template
  • 2005/6/10 9:33

  • andycleff

  • Not too shy to talk

  • Posts: 108

  • Since: 2005/4/29


Looks like the 3rd value is the default value. See here:

https://xoops.org/misc/api/kernel/form/XoopsFormRadioYN.html

I changed $story->ihome() to 0 tested and then found out it had to be 1.

0=yes and 1=no on this form.

Guess that's what the "TO DO" note was about.
//TODO: Check that pubinhome is 0 = no and 1 = yes (currently vice versa)

4
Mithrandir
Re: AMS Submit Template

if you change it from $story->ihome you destroy the editing of the story.

Instead change the ihome property of $story when you create a new story (submit.php, case "newarticle":)

Login

Who's Online

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


Members: 0


Guests: 187


more...

Donat-O-Meter

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

Latest GitHub Commits