Previous Thread
Next Thread
Print Thread
Rate Thread
#176419 08/01/2002 3:07 AM
Joined: Sep 2001
Posts: 71
Member
Member
Offline
Joined: Sep 2001
Posts: 71
Hmm..Well, I'm recreating an old useful hack of mine, but I seem to have forgotten how to make a website like this..

If I were to have a URL that was..

Http://www.website.com/cgi-bin/ultimatebb.cgi?ubb=blah

How do I make the ubb so when I type a link in (for ultimatebb.cgi?ubb=****) it pops up a page that I want?

Lord Dexter tried to explain but I didnt get it well wink

Sponsored Links
#176420 08/01/2002 7:27 AM
Joined: May 2001
Posts: 6,708
Member
Member
Offline
Joined: May 2001
Posts: 6,708
Code
if ($ubb eq 'name here') {
&RequireCode("$vars_config{CGIPath}/name of .cgi file you are linking from");
&name of sub you want the code called from;
exit(0);
} #end name here
Just edit all those areas in that code.

#176421 08/01/2002 11:47 AM
Joined: Sep 2001
Posts: 71
Member
Member
Offline
Joined: Sep 2001
Posts: 71
This is what I have..

if ($ubb eq 'fader') {
open(F,"$vars_config{nonCGIURL)/fader.html") or die $!;
print while();
close(F);
exit(0);

} # End Text Color Fader

And I need to make it complient with templates..

#176422 08/01/2002 1:21 PM
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
Do not use open() alone. Use FileHandler or an OpenFileAs* routine.


UBB.classic: Love it or hate it, it was mine.
#176423 08/01/2002 3:44 PM
Joined: Sep 2001
Posts: 71
Member
Member
Offline
Joined: Sep 2001
Posts: 71
I'm completely stupid with stuff like that wink
So I have no idea what you mean tipsy

Sponsored Links
#176424 08/02/2002 1:55 AM
Joined: May 2001
Posts: 6,708
Member
Member
Offline
Joined: May 2001
Posts: 6,708
He means don't use

open(F,"$vars_config{nonCGIURL)/fader.html")

Use something like:

OpenFileAs(F,"$vars_config{nonCGIURL)/fader.html")

So, change the method of opening that file.

Sorry if I misunderstood what ya meant.

#176425 08/02/2002 9:18 AM
Joined: Sep 2001
Posts: 71
Member
Member
Offline
Joined: Sep 2001
Posts: 71
I'm getting this error..
Bareword "F" not allowed while "strict subs" in use at ultimatebb.cgi line 239. Execution of ultimatebb.cgi aborted due to compilation errors.

#176426 08/02/2002 9:38 AM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
:rolleyes:
Code
if ($ubb eq 'fader') { 
print &OpenFileAsString("$vars_config{NonCGIPath)/fader.html");
exit(0);
} # End Text Color Fader

#176427 08/02/2002 10:05 AM
Joined: Sep 2001
Posts: 71
Member
Member
Offline
Joined: Sep 2001
Posts: 71
^^^ I corrected the } for up there, but I get an internal server error..

#176428 08/02/2002 10:11 AM
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
LD, stop making a fool out of yourself. Le sigh.

Halobreak, do you have access to the server error log?


UBB.classic: Love it or hate it, it was mine.
Sponsored Links
#176429 08/02/2002 10:14 AM
Joined: Sep 2001
Posts: 71
Member
Member
Offline
Joined: Sep 2001
Posts: 71
edit: I just asked my host via aim..Hold on.

#176430 08/02/2002 10:19 AM
Joined: Sep 2001
Posts: 71
Member
Member
Offline
Joined: Sep 2001
Posts: 71
[Fri Aug 2 10:59:32 2002] [error] [client 204.xxx.xxx.xx] malformed header from script. Bad header=: /home/halo/public_html/cgi-bin/UBB/ultimatebb.cgi

#176431 08/02/2002 10:33 AM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Can you try to CHMOD fader.html to 777?

#176432 08/02/2002 10:42 AM
Joined: Sep 2001
Posts: 71
Member
Member
Offline
Joined: Sep 2001
Posts: 71
I CHMODed the fader.html and it still gives me an internal server error

#176433 08/02/2002 12:15 PM
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
Try:

print header() . &OpenFileAsString("$vars_config{NonCGIPath)/fader.html");


UBB.classic: Love it or hate it, it was mine.
#176434 08/02/2002 2:53 PM
Joined: Sep 2001
Posts: 71
Member
Member
Offline
Joined: Sep 2001
Posts: 71
Yes! It worked! Thank you Charles, thank you very much. And thank you all who helped (or tried.. wink ).

#176435 08/02/2002 7:59 PM
Joined: May 2001
Posts: 6,708
Member
Member
Offline
Joined: May 2001
Posts: 6,708
Quote
quote:
Originally posted by Charles Capps:
LD, stop making a fool out of yourself. Le sigh.

Like I said, I wasn't quite sure.


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)