FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » adding new functionality
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
adding new functionality [message #22846] Fri, 18 February 2005 15:09 Go to next message
dennisp is currently offline  dennisp   Belize
Messages: 49
Registered: December 2004
Location: Belize
Karma: 0
Member
Hi,
I am trying to add an extra functionality to allow certain privilaged users to be able to rate a message. I need to do a form submission to update certain fields when the submit button is clicked. I was looking at the rate thread form >
"<form action="index.php?t=ratethread>"
As I studied the code I noticed that t=ratethread, means that ratethread.php is called.
Am I correct?

Well At first i was playing with the cases in init_usr function but then i noticed that that was for the pathinfo type urls and i am playing with the default.
I did no find any "special" checks on the variable $t for default url style and so i assume that ratethred.php is called as soon as it is pased through the url and so in my addtion I did a
<form action =index.php?t=ratepost>
but this does not seem to work. Any help please....
Smile
best regards,
Dennis

Re: adding new functionality [message #22856 is a reply to message #22846] Fri, 18 February 2005 16:28 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You don't need to hack the code for this.

There is a group permission settings "Rate topics" that can be used to control the ability of users to rate topics.


FUDforum Core Developer
Re: adding new functionality [message #22865 is a reply to message #22846] Fri, 18 February 2005 16:57 Go to previous messageGo to next message
dennisp is currently offline  dennisp   United States
Messages: 49
Registered: December 2004
Location: Belize
Karma: 0
Member
Hi
I am aware of the forum's in built topic rating functions.

I am trying to hack the code to allow certain privilaged users to be able to rate individual "posts" not topics. Smile

I want to try and call my functions from a file called ratepost.php.
I noticed that to rate a topic you pass t=ratethread to the index.php through the form and so i tried to set t=ratepost in the
forms action, ie. <form action="index.php?t=ratepost"> but it did not work
Please help.
thanks

regards
Dennis
Re: adding new functionality [message #22867 is a reply to message #22865] Fri, 18 February 2005 17:19 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The .php are all generated and need to exist (and be readable) for the forum to be able to access them via ?t=name_of_file.



FUDforum Core Developer
Re: adding new functionality [message #22916 is a reply to message #22846] Mon, 21 February 2005 10:27 Go to previous message
dennisp is currently offline  dennisp   United States
Messages: 49
Registered: December 2004
Location: Belize
Karma: 0
Member
Thanks Illia,

I spent an entire evening trying to figure out why the t=ratepost would not call ratepost.php even though it was world readable.

Well I fugured out that for some reason the ratepost.php had to be owned by the web server.

At first I had it owned by a user with perms of 644 Wink. I then changed it to belong to the web server and everything worked like a charm Smile
thanks again,
regards
Dennis
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to create new sub-forum visible only to mods?..
Next Topic: Downloads for registered users only?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 15:32:41 GMT 2024

Total time taken to generate the page: 0.03722 seconds