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
I've wondered about this myself. Hope you get an answer soon.
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.
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
*
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
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
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
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
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.
Felix - Please explain further so we know what you're trying to do.
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
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.
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.
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.
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.
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
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).
Allen, how do I get the script for that? without the sidepanels?
Prime, ok, I will wait for it.
Thank you very much
Felix
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
I understand, I will wait.
thank you
any news Allen? forgot about me
haven't forgotten, I've been working on it still
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*
Thanks Randy
No problem, PT is at Netwerkin a lot so I figured he just needed a little *reminder*.
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.
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
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.
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?
He's at Netwerkin just about everyday. I'll try to remember to remind him this evening.
did you get him Randy?
I signed in there too...nice site, love those tables and strips....good info as well
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.
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.
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
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
Ok, I will take yours. mean time maybe Allen will make my wish come true
Thanks Prime
Which dream is that?
I've been slowly updating it and CC gave me the fix so it could be outside the ubb directory and still find the modules.. the trick will be if your server allows cgi in the root
I've been thinking of another possible solution, but I'm not sure if I could pull it off yet
it doesnt...I mean I know I can load it in the root but I cant call it. it has to be inside the public_html directory in order to access it with the browser
well yeah,
I meant the public web root, or any other public folder for that matter
If you can't access it it's not gonna do you m,uch good
as long is in the public_html (sub root) it will work.
thanks Allen
You can give this a go and see if this is something you can work with. Again, sorry for the delay Felix.
=============
UBB {Basic) Blank .cgi Page revised 2/21/04 (a work in progress...)
Description: A (basic) Blank UBB .cgi page.
Demo:
Demo click here Download:
Download click here =============
Good luck!
doesnt work Prime.
It creates the page alright but no header no footer. I checked yours and it looks okay, but look at mine:
http://www.romanianational.com/cgi-bin/ultimatebb.cgi?ubb=ubbtest_blank
Hmm...Try this:
Click Here Just replace the original file with the revised version, save and clear cache. See if that works.
Dead link wont work Prime ?
Yeh it appears that all of bac-clan.com is down
...
I apologize about that. The site's been down for nearly two days now...Seen that it's not due to maintanence I'll check with Ghost to find out what's going on.
I'll post back soon.
Originally posted by PrimeTime:
I apologize about that. The site's been down for nearly two days now...Seen that it's not due to maintanence I'll check with Ghost to find out what's going on.
I'll post back soon.
*sees evil chance to create hysteria*
I heard it's cause they're upgrading to 6.7
Hehe...I wish, but it was more of a:
"Domain registry lost our DNS server entries"
We think that the company upgraded their software/database but left out our clan domains.
I said clan domains because the other domains (non-clan related) are up. :rolleyes:
It's now a waiting game...
Hahaha, in that case, 72 hours :x...
I'm hoping it will be within 24 - 48 hours...But you know how things can be. With 72 hours it will just push us back for a week. We'll certainly have some explaining to do. LOL.
it's been down for a while as is lol... I went lookin for a mod and saw it was down a few days ago ;x..
Two days so far...If it's 72 hours then it will be 5 days down time total. It will be a first for us.
Prime, if you have it handy you could zip it to me?
thanks
Although .net and .org is still down the .com is back up...The link below should work now.
Click Here Just replace the original file with the revised version, save and clear cache. See if that works.
nope, same thing Prime, no difference what so ever.
You're running 6.3.1.1 so...
Open ubb_ubbtest_blank.cgi (revised) and find:
$ThisHTML = $Header;
$ThisHTML .= qq~
And REPLACE it with:
Find:
And REPLACE it with:
Find and DELETE:
Save, upload and clear cache. See if this works.
no Prime, same thing.
Felix...What is the link to your blank.cgi?
Odd...Even with the least amount of code the Header and Footer should display (as tested on 6.3.1.1 and 6.4). It's all tagged from the public_common.pl file. I'll go back again and start from scratch.
Hey ! gettong something.
I added Ian's line and I get the Forum Title and the links line.
here Prime:
http://romanianational.com/cgi-bin/ultimatebb.cgi?ubb=ubbtest_blank and to compare:
http://romanianational.com/cgi-bin/ultimatebb.cgi now, where is the rest?
thank you
I didn't know you wanted the Title and button lines. As for the Header and Footer, that's what I'm trying to figure out...Why yours isn't working. I'm not giving up so don't worry.
Prime, yes I do want it that.
This is the main reason I stared asking Allen, because his game.cgi page is so clean and shows a full page.
http://romanianational.com/cgi-bin/games.cgi I didnt know this will raise so many issues and now I feel bad for creating you problems. I am sorry. (but still want that page! )
thank you,
Felix
sub StartPage{
&LoadTemplate("public_common");
&InitImportantStuff;
$MainButtonsLine = &MainButtonOptions;
&init_public_common;
&set_page_elements;
print ("Content-type: text/htmlnn");
print <<HEAD;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
$Header
<center>
$standard_title_table
</center>
HEAD
} #end
#############################################################################
sub EndPage{
print qq($Footer);
} #end
I thought about loading the public_common.pl too but it's not necessary since ultimate_bb.cgi has it. Even with the least amount of code the Header and Footer should display.
getting there but there is an error:
Undefined subroutine &main::ubbtest_blank called at ultimatebb.cgi line 557.
and no footer
Both sub routines need to be changed and defined. Such with:
and
do not exist. Right now UBB only recognizes:
which is the ubb_ubbtest_blank.cgi file. As for the Header Ian added:
which some .cgi files have. I haven't checked but maybe you can add:
before:
I still haven't gone it over from scratch but I'll do it sometime Friday or this weekend.
Then again maybe you can add:
after:
Prime, it doesnt work, neither the header or footer. the problem is somewhere else, read the error message.
It doesnt matter what I add, I get the same thing, I think fixind that routine should be the first step and then the footer and header.
right now I only kept this:
sub StartPage{
&LoadTemplate("public_common");
&InitImportantStuff;
$MainButtonsLine = &MainButtonOptions;
&init_public_common;
&set_page_elements;}
and I get the same message as above.
dont give up!
have a great weekend.
As I posted in my other reply the subroutines that Ian posted won't work, because it has not been defined in the ubb_ubbtest_blank.cgi & ultimatebb.cgi files. The routine that I made does not need to be fixed at all...I just need to figure out why yours isn't working.
If worse comes to worse the last resort would be to manually include the Header and Footer codes in the ubb_ubbtest_blank.cgi file.
OK Felix...Try this
:
Click Here Since you've already added the code in ultimatebb.cgi and ubb_lib.cgi just replace the ubb_ubbtest_blank.cgi file and clear cache.
Problems with your server again Prime? Every weekend now?
"code=DNS_TIMEOUT] A DNS lookup error occurred because..."
I don't think the DNS registry has been completely resolved yet. This isn't a server problem...It's actually running perfectly. Anyway, the link is up.
Hi Prime, sorry I was busy for the last past days.
Anyway, the page...still the same, I get the links line but thats about it, no header, no footer no Registered Members Line, no Login or PM Inbox etc...see link:
http://romanianational.com/cgi-bin/ultimatebb.cgi?ubb=ubbtest_blank
Registered Members Line, Login and PM Inbox are different set of codes...I didn't know you wanted those added??? As for the Header and Footer...Something is not right. I verified the codes with 6.3.1.1 and 6.4 and it should work, as it did with all of my tests.
I'm assuming that you've entered the codes in ultimatebb.cgi and ubb_lib.cgi? Hmm...
If possible can I see your public_common.pl file? Either I'm going crazy or...
I need to know exactly where you've entered the Header and Footer codes. Was in manually added in the public_common.pl OR did you enter the codes via Control Panel?
in the CP Prime, they all are in the Styles Templates in the CP.
yes, I added those lines in the ubb_lib as well
Anybody knows where prime is?
Hiding from you?
...