|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
I would like to make a CGI page, just to show the header, the link line and the footer links and Infopop link. Just imagine The forum Summary without any tables. Am I on a good start? #!/usr/bin/perl
&LoadTemplate("public_common"); %vars_style = &LoadStyleTemplate("summary_page"); &set_page_elements;
@ubber = cookie("ubber$vars_config{Cookie_Number}"); if ($ubber[0] ne '') { $username = $ubber[0]; } if ($ubber[1] ne '') { $password = $ubber[1]; } if ($ubber[2] ne '') { $pubname = $ubber[2]; } if ($ubber[3] ne '') { $user_topic_view = $ubber[3]; } if ($ubber[4] ne '') { $user_number = $ubber[4]; }
if (@ubber) { @checkTheProfile = &verify_id_num_2($username, $password, $user_number); unless ($checkTheProfile[4] =~ /Write/) { print header( -charset => "$masterCharset", -type => "text/html" ); &StandardHTML("User not approved"); } } elsif ($opt{members_only}) { &StandardHTML(qq!$vars_wordlets_err{not_logged_in}
<a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=login" target="_blank">$vars_wordlets{login_now}</a> $vars_wordlets{or} <a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=agree" target="_blank">$vars_wordlets{register_title}</a>!); }
if ($@) { print ("Content-type: text/htmlnn"); print "Error including required files: $@n"; print "Make sure these files exist, permissions are set properly, and paths are set correctly."; exit; }
$show_logout = qq~ <script language="Javascript" type="text/javascript"> <!-- var user_cookie = getCookie('ubber$vars_config{Cookie_Number}'); if(('' == user_cookie) || (null == user_cookie)) { document.writeln('$vars_wordlets{not_logged_in}' , ' <a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=login">$vars_wordlets{login_now}</a> $vars_wordlets{or} <a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=agree">$vars_wordlets{register_link}</a>') } else { var user_array=user_cookie.split("&"); user_array[2] = unescape(user_array[2]); document.writeln('$vars_wordlets{hello} ', user_array[2]); document.writeln('[ <a title="$vars_wordlets{logout_acronym}" href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=logoff">$vars_wordlets{logout}</a> ]'); } // end else //--> </script> ~;
If not can someone point me the right way? Thank you, Felix
|
|
|
|
Joined: Jun 2001
Posts: 2,849
Spotlight Winner
|
Spotlight Winner
Joined: Jun 2001
Posts: 2,849 |
I've wondered about this myself. Hope you get an answer soon.
|
|
|
|
Joined: Nov 2001
Posts: 1,080
Member
|
Member
Joined: Nov 2001
Posts: 1,080 |
For a basic .cgi file all you need are a few lines inside such as: &set_page_elements;
$ThisHTML = $Header; $ThisHTML .= qq~
$Footer ~; Anything in between "qq~" and "$footer" is your HTML codes. Now you have your .cgi file. You will now need ultimatebb.cgi to recognize this file when called. To do so add: In ultimatebb.cgi find: # all ubb options: $ubb = "" unless $ubb; Add after: # whatever_title_here if ($ubb eq 'file_name') { &set_page_elements; &RequireCode("$vars_config{CGIPath}/cgi_file_here.cgi"); &file_name; exit(0); } #end whatever_title_here And in ubb_lib.cgi find: Add after: 'file_name' => q^|file_name|^, And find: Add (with space after): This will give you the basic .cgi file. Of course you can add other stuff later like: login info Recent Vistors recognition Wordlets Calendar Stats And whatever you want... Hope this helps. 
|
|
|
|
Joined: Nov 2001
Posts: 1,080
Member
|
Member
Joined: Nov 2001
Posts: 1,080 |
With this you can now create your own .cgi Homepage (portal).  The only thing that I (and Brett  ) were stuck on was the inclusion of UBBNews without the use of javascript...We both were targetting a Perl method. We had almost everything else needed in a homepage. I think Bobbitt came up with a code that could do it. There was a time when many UBB users were heavily interested in a portal. Anyone knows the status (succeeded, ongoing, dead)? *The .cgi version  *
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
creating an index.cgi would be fairly simple after all the hassle I've been through with the various scripts the last few months (games, links, etc). ubbnews would be the toughy, unless mike's script can be included like a content island 
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
Allen, I was going to ask you pesonally anyways. The template I was trying to develop into a page I took from your games.cgi because it is the simples ever of all and it is a stand alone.
My question to was was: what shoud I delete from the games.cgi script so I dont get the games table, just an empty page so I can insert my own codes into it ?
Thank you, Felix
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
Prime, the code you gave me up above. Is this how you start the page? Isnt there anything to call the forum template into the new page? Or ultimatebb.cgi would do that?
Why cant this page stand alone like Allen's Games.cgi or Mike's album.pl without being necessary to call it through ultimatebb ?
Thank you, Felix
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
quote: Originally posted by Felix 10:
My question to was was: what shoud I delete from the games.cgi script so I dont get the games table, just an empty page so I can insert my own codes into it ?
Thank you, Felix Change showmain to showindex and call the file index.cgi... that's probably too simple... once you've included the ubb files like at the top of the page, you need showindex to do the startpage and endpage, with the other stuff tossed in between You can add content islands for most content, a ubbnews script for some other content, etc etc etc. I can look at it at some point, I really wanna get the links script further down the road 
|
|
|
|
Joined: Nov 2001
Posts: 1,080
Member
|
Member
Joined: Nov 2001
Posts: 1,080 |
quote: Originally posted by Felix 10: Prime, the code you gave me up above. Is this how you start the page? Isnt there anything to call the forum template into the new page? Or ultimatebb.cgi would do that?
Why cant this page stand alone like Allen's Games.cgi or Mike's album.pl without being necessary to call it through ultimatebb ?
Thank you, Felix I haven't checked the Games.cgi or album.pl but the code I posted is probably the easiest method to having a fully (UBB) intergrated .cgi page. From login to PM to Wordlets to Recent Visitors to Search and more...It's all possible through this one page. The "ultimatebb.cgi" is the heart of UBB so you want all of your UBB pages to go through it..."ubb_lib.cgi" is also a criticial file. While a separate CSS can be used, because this .cgi page is another UBB page, it uses the routines in "public_common.pl" (e.g., templates ($TBT and $TBB), header, footer, etc.). The code I posted is the skeleton of what the Homepage was(is) to be, but you can use it for anything really. It doesn't matter whether it's .cgi or .pl...I just preferred .cgi. A standalone won't cut it in my opinion...Not for a Homepage...Not for a UBB page.
|
|
|
|
Joined: Nov 2001
Posts: 1,080
Member
|
Member
Joined: Nov 2001
Posts: 1,080 |
Felix - Please explain further so we know what you're trying to do.
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
Prime, I read and I read ..and the more I read the dumber I get.....LOL. Okay, I want to make a page, just a page not the Homepage, in which to integrate an other one, this: http://romanianational.com/cgi-bin/album.pl so it looks like is part of the UBB board (header, footer, links line). Pretty much same thing Allen did with the Games: http://romanianational.com/cgi-bin/games.cgi Do you understand? Dont take it wrong Prime, I dont doubt you understand, I very much doubt I explain properly Thank you, Felix
|
|
|
|
Joined: Jun 2001
Posts: 2,849
Spotlight Winner
|
Spotlight Winner
Joined: Jun 2001
Posts: 2,849 |
quote: Originally posted by PrimeTime: With this you can now create your own .cgi Homepage (portal). The only thing that I (and Brett ) were stuck on was the inclusion of UBBNews without the use of javascript...We both were targetting a Perl method. We had almost everything else needed in a homepage. I think Bobbitt came up with a code that could do it.
There was a time when many UBB users were heavily interested in a portal. Anyone knows the status (succeeded, ongoing, dead)? *The .cgi version *I think that a *semi-supported* UBB Portal would drastically increase the traffic and member participation here. I think that would be a VERY good thing for UBBDev.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
quote: Originally posted by PrimeTime: I haven't checked the Games.cgi or album.pl but the code I posted is probably the easiest method to having a fully (UBB) intergrated .cgi page. From login to PM to Wordlets to Recent Visitors to Search and more...It's all possible through this one page. The "ultimatebb.cgi" is the heart of UBB so you want all of your UBB pages to go through it..."ubb_lib.cgi" is also a criticial file. While a separate CSS can be used, because this .cgi page is another UBB page, it uses the routines in "public_common.pl" (e.g., templates ($TBT and $TBB), header, footer, etc.).
The code I posted is the skeleton of what the Homepage was(is) to be, but you can use it for anything really. It doesn't matter whether it's .cgi or .pl...I just preferred .cgi. A standalone won't cut it in my opinion...Not for a Homepage...Not for a UBB page. standalone requires a few less files... not many, but a few  could help with server load, especially if all you're doing is reading a cookie, and requiring a few subs... it's different if they're actually needing to post to the front page or something.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
argh.. looked at this again tonight... getting the header/footer for some generic page is simple - deciding what content to include for an index page is difficult at best - it assumes everyone wants the same layout, wants the same content, etc... should there be 1, 2, or 3 or even 4 columns?
I'll write a blank one and give a big ol' PUT YOUR CONTENT HERE pointer until someone has time to write something more substantial.
|
|
|
|
Joined: Nov 2001
Posts: 1,080
Member
|
Member
Joined: Nov 2001
Posts: 1,080 |
I already posted the code above (3rd post)...It shouldn't be any easier than that.  I didn't include additional content but it won't be difficult to include (with exception to the UBBNews) because it's already written from previous hacks and codes...It's just a matter of cut and paste. (Allen seen the quick-make page a while back.) Custom templates is as difficult as the complexity of the designs. UBBNews and CP intergration are the only two things will make it complete. For what Felix wants to do, however, everything is already there to make the page (Header/Footer).  Unless you're thinking something different than I am. 
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
Prime, it is not working. A few problems: 1. I get a page but with a error message: " Undefined subroutine &main::album called at ultimatebb.cgi line 557." Note: my editor starts with 00001 not 00000. 2. I have a "Content-type: text/html " in the left top corner 3. the style template is not the one I am curently using. This is the page: &set_page_elements;
$ThisHTML = $Header; $ThisHTML .= qq~
TESTING THE NEW .CGI PAGE
TESTINGGGGGGGGGGGGGGG
TESTING THE NEW .CGI PAGE
TESTING THE NEW .CGI PAGE
$Footer ~; Thank you
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
|
|
|
|
Joined: Nov 2001
Posts: 1,080
Member
|
Member
Joined: Nov 2001
Posts: 1,080 |
LOL Allen. OK...I see now.
As for Felix, the code does work. Sometime tomorrow or the weekend I'll have the page + code (instead of just codes).
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
Allen, how do I get the script for that? without the sidepanels?
Prime, ok, I will wait for it.
Thank you very much
Felix
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
I'll post it shortly - going out of town tho, so if it's not today, will be done Sunday. It uses whatever header/footer you use on your forum summary, so if you have sidepanels it uses them, if not, not 
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
I understand, I will wait. thank you
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
any news Allen? forgot about me 
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
haven't forgotten, I've been working on it still 
|
|
|
|
Joined: Jun 2001
Posts: 2,849
Spotlight Winner
|
Spotlight Winner
Joined: Jun 2001
Posts: 2,849 |
Originally posted by PrimeTime:
LOL Allen. OK...I see now.
As for Felix, the code does work. Sometime tomorrow or the weekend I'll have the page + code (instead of just codes).
*waits*
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
Thanks Randy 
|
|
|
|
Joined: Jun 2001
Posts: 2,849
Spotlight Winner
|
Spotlight Winner
Joined: Jun 2001
Posts: 2,849 |
No problem, PT is at Netwerkin a lot so I figured he just needed a little *reminder*.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
There's a problem with current implementations and the mainbuttons line, it's still being looked at.
If you want a php version, check the 2 mods I posted in the last couple of days in the mod forum... works real swell and should be a lot easier on the server as it doesn't use any ubb files directly.
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
Allen, I cant use that. I am running 6.3.1.1 and I dont have this: if($ubb eq "qmq") { # Quick Member Queue I think I know the problem with the main link line. In your Games pages I lost IM link when I installed games.cgi, but it didnt bother me much. BTW do you have a fix for that? Cant you just strip the games for the games.cgi and lend me the script? or it is not that easy. Thank you, felix
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
it's not that easy.. everything I've been working on will probably not work on any ubb prior to 6.6 or 6.5, Idda know. I've been testing everything on 6.7.
There's too many older versions for me to install and test on each - just not enough hours in the day, sorry. Maybe PT's script wil work for you.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
quote: LOL Allen. OK...I see now.
As for Felix, the code does work. Sometime tomorrow or the weekend I'll have the page + code (instead of just codes).
Prime Time, still around? 
|
|
|
|
Joined: Jun 2001
Posts: 2,849
Spotlight Winner
|
Spotlight Winner
Joined: Jun 2001
Posts: 2,849 |
He's at Netwerkin just about everyday. I'll try to remember to remind him this evening.
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
did you get him Randy? I signed in there too...nice site, love those tables and strips....good info as well 
|
|
|
|
Joined: Jun 2001
Posts: 2,849
Spotlight Winner
|
Spotlight Winner
Joined: Jun 2001
Posts: 2,849 |
|
|
|
|
Joined: Nov 2001
Posts: 1,080
Member
|
Member
Joined: Nov 2001
Posts: 1,080 |
ACK...I apologize Felix for my absence. Hmm...OK. Now that I understand what Allen was referring to I need to take a step back. His .cgi page is a standalone (index) which you can see from the URL. With the version I have, you will have "ultimatebb.cgi" in front of the addy. Both are intergrated with UBB. The question I guess really depends on what you wish to do with your .cgi page. Again, I apologize for your wait. 
|
|
|
|
Joined: Nov 2001
Posts: 1,080
Member
|
Member
Joined: Nov 2001
Posts: 1,080 |
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
wow..that was little harsh...I hope he didnt mind, I dont want to be a s_ _ _t disturber. Christmas is way behind but I can wait. thank you for your help. 
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
Ops, we were writing posts in the same time, you were little faster though. I just need an empty page with the header and the footer where I can stick the another page (just like Allen did with the Games page) - a Photo Album, so it will integrate in the style and look like is part of the board, that's all. I know Allen's is a stand alone, and it was so easy to add, this is what I was trying to do, I thought it would be simple. But if that creates problems and takes too much time from your part I will give up, I dont want to be a trouble maker. Thanks again and there is no need to apologize, I understand 
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
|
|
|
|
Joined: Nov 2001
Posts: 1,080
Member
|
Member
Joined: Nov 2001
Posts: 1,080 |
Creating an index page like Allen's I'm afraid not. With his page you should be able to do what you want to do. Creating a (blank) extension UBB page, in which you can add your own content, I can do. The difference is that with my page it's not standalone (it's a part of UBB)...The URL will look similar to: http://www.blah-blah.com/ubb/ultimatebb.cgi?blank_extension_page With Allen's the URL will look like: https://www.ubbdev.com/ubbcgi/index.cgi
|
|
|
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.
|
|
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|