11
Tobias
Re: Another article 1.0 question
  • 2007/7/9 5:57

  • Tobias

  • Not too shy to talk

  • Posts: 172

  • Since: 2005/9/13


Okay, quick and dirty:

It does, indeed, seem to do the trick if you flush the variable before you use it in the form. In /modules/article/include/form.article.elements.php around line 184:

// Source
[color=ff0000]$art_source='';[/color]
$form_element["active"]["art_source"] = new XoopsFormSelect(art_constant("MD_SOURCE"), "art_source"503$art_source);
$form_element["active"]["art_source"]->addOptionArray(
array(
"op1" => "option 1",
"op2" => "option 2",
"op3" => "option 3"
)
);


That is phppp's suggestion from here, plus an additional first line to initialize the variable (in red).

Ideally, you would read out the value from the database and preselect an element of the array accordingly, but that's too much for me now. In any case, this seems to write a correct new value to the db if one is selected, and leave the old one intact if none is selected. Don't ask me why and how, though. Let me know whether it works.

I hear your pain re our intended audiences never realizing the brilliance and usefulness of our sites. By the way: I'm getting a good chunk of all my traffic from people looking for satellite images, and I'm scoring terribly high on searches in all the LA googles for satellite images, and that's all for the googlemaps module and inspite of the fact it doesn't really have a whole lot to do with my site. Of course, most visitors just bounce off, but a good 20% seem to look at at least a second page.
www.affvu.org

12
patagon
Re: Another article 1.0 question
  • 2007/7/9 17:30

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


Tobias, I just tried this on my local XOOPS and it works! this is enough for what I need, again, thank you very much for all your help

Login

Who's Online

110 user(s) are online (78 user(s) are browsing Support Forums)


Members: 0


Guests: 110


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