Status: offline

lestat

Forum User
Chatty
Registered: 11/15/03
Posts: 64
In admin/story.php, regarding this function,

function submitstory
($type='',$sid,$uid,$tid,$title,$introtext,$bodytext,$hits,$unixdate,$co
mments,$featured,$commentcode,$statuscode,$postmode,$frontpage,$draft_fl
ag,$numemails,$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,
$perm_anon,$delete,$show_topic_icon)

How are these values set when a new story is submitted to the database. The variables are being passed to this function, but where and/or at what point are the variables being set to the form values passed in HTTP? Is there a global $HTTP_POST_VARS where these values are set in?

Thanks.

Status: offline

Limynali

Forum User
Chatty
Registered: 01/07/03
Posts: 39
Geeklog uses global variables in PHP. This means that when a form is submitted, all the inputs are turned into variables.

For instance, if a textbox on that form had the name "bodytext" then a variable would be automatically created called $bodytext and would be initialized to the value of the textbox.

So most (if not all) of those variables are created and initialized through global variable "magic" and are not pulled from $HTTP_POST_VARS or $HTTP_GET_VARS.
Got root?

Status: offline

lestat

Forum User
Chatty
Registered: 11/15/03
Posts: 64
thank you for the info. i added a select called "tradeposition" to the form. then i added "$tradeposition" to the end of the function submitstory argument list. after i submit a story i get "missing arguement 26 for submitstory()". arguement 26 is the place of $tradeposition. any thoughts? thank you.

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
You have to add it to the function argument list that you posted, as well as to where the function is called, at the end of the file.

Status: offline

lestat

Forum User
Chatty
Registered: 11/15/03
Posts: 64
That solved it! Thank you very much. Appreciated.