Previous Thread
Next Thread
Print Thread
Rate Thread
#127084 08/19/2001 5:58 PM
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
Im doing some modifications to postings.cgi
just around the area where this line can be found
$TopicSubject = &CensorCheck("$TopicSubject");

Now what I would like to know it how can I tell when the user is trying to post a new topic, and not be replying or trying to edit a thread?

Ive tried checking if action eq "newtopic" but that hasn't worked, any other ideas?

Thanks


I can't afford a good signature editor frown
Sponsored Links
#127085 08/19/2001 7:12 PM
Joined: Jan 2000
Posts: 395
Member
Member
Offline
Joined: Jan 2000
Posts: 395
Use the Who's Online hack.

#127086 08/19/2001 7:38 PM
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
No, there has to be an easier way!
A variable is passed in the string
action=newtopic
action=postreply
etc....

There has to be a way I can just refer to these.


I can't afford a good signature editor frown
#127087 08/19/2001 9:16 PM
Joined: Jan 2001
Posts: 1,940
Developer
Developer
Offline
Joined: Jan 2001
Posts: 1,940
All the ubb variables are placed in the %in hash so to see what action they are doing, you must check if ($in{action} eq 'blah_action') ...

qasic

#127088 08/19/2001 10:12 PM
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
Thats the string which I tried,
I found it further on down in postings.cgi

would it be ok to check for
if ($in{action} eq 'newtopic')
in the area just above where this line can be found?
$TopicSubject = &CensorCheck("$TopicSubject");

Thanks


I can't afford a good signature editor frown
Sponsored Links
#127089 08/20/2001 2:30 AM
Joined: May 2001
Posts: 6,708
Member
Member
Offline
Joined: May 2001
Posts: 6,708
I'm a bit confused, What do ya mean by how can I tell? In what way?

#127090 08/20/2001 5:52 PM
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
Well I need to be able to distinguish between what action is trying to be performed by the user.
For example, if they click on the edit button they will get a URL that looks like this.
http://www.domain.com/ubbcgi/postings.cgi?action=editpost&forum=......

Now if they post a new reply the URL that is parsed is
http://www.domain.com/ubbcgi/postings.cgi?action=reply&forum=...

and if they post a new topic it looks like
http://www.domain.com/ubbcgi/postings.cgi?action=newtopic&number=1...

Now from these examples you can see that the word ACTION in these string changes depending on what the user is trying to do. Now all I need to know is how to tell when the user has clicked on the NEW TOPIC button


I can't afford a good signature editor frown

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)