Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
#182657 12/08/2003 11:29 PM
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
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?
Code
#!/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) &#0124;&#0124; (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

Sponsored Links
#182658 12/09/2003 8:16 PM
Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,849
I've wondered about this myself. Hope you get an answer soon.

#182659 12/09/2003 9:47 PM
Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
Joined: Nov 2001
Posts: 1,080
For a basic .cgi file all you need are a few lines inside such as:

Code
&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:
Code
# all ubb options:
$ubb = "" unless $ubb;
Add after:

Code
# 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:
Code
	my %types = (
Add after:
Code
		'file_name' => q^|file_name|^,
And find:
Code
	foreach my $type (qw(
Add (with space after):
Code
file_name 
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. smile

#182660 12/09/2003 10:16 PM
Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
Joined: Nov 2001
Posts: 1,080
With this you can now create your own .cgi Homepage (portal). wink The only thing that I (and Brett laugh ) 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 laugh *

#182661 12/10/2003 2:00 AM
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). tipsy

ubbnews would be the toughy, unless mike's script can be included like a content island smile


- Allen wavey
- What Drives You?
Sponsored Links
#182662 12/11/2003 4:12 PM
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
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

#182663 12/11/2003 4:20 PM
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
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

#182664 12/12/2003 1:49 AM
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
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 tipsy

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 smile


- Allen wavey
- What Drives You?
#182665 12/13/2003 5:19 AM
Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
Joined: Nov 2001
Posts: 1,080
Quote
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.

#182666 12/13/2003 5:23 AM
Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
Joined: Nov 2001
Posts: 1,080
Felix - Please explain further so we know what you're trying to do.

Sponsored Links
#182667 12/13/2003 8:08 PM
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
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 smile

Thank you,
Felix

#182668 12/13/2003 10:33 PM
Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,849
Quote
quote:
Originally posted by PrimeTime:
With this you can now create your own .cgi Homepage (portal). wink The only thing that I (and Brett laugh ) 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 laugh *
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.

#182669 12/14/2003 3:24 PM
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
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 smile 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.


- Allen wavey
- What Drives You?
#182670 12/15/2003 2:51 AM
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.


- Allen wavey
- What Drives You?
#182671 12/15/2003 3:55 AM
Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
Joined: Nov 2001
Posts: 1,080
I already posted the code above (3rd post)...It shouldn't be any easier than that. smile 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). smile Unless you're thinking something different than I am. laugh

#182672 12/17/2003 1:43 AM
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
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."
[Linked Image]

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:

Code
 
&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

#182673 12/19/2003 2:46 AM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3


- Allen wavey
- What Drives You?
#182674 12/19/2003 3:33 AM
Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
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).

#182675 12/19/2003 4:16 PM
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
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

#182676 12/19/2003 5:29 PM
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 smile


- Allen wavey
- What Drives You?
#182677 12/19/2003 7:53 PM
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
Joined: Oct 2002
Posts: 394
I understand, I will wait.
thank you

#182678 12/28/2003 9:30 PM
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
Joined: Oct 2002
Posts: 394
any news Allen? forgot about me smile

#182679 12/31/2003 3:58 PM
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 smile


- Allen wavey
- What Drives You?
#182680 12/31/2003 4:05 PM
Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,849
Quote
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*

#182681 01/01/2004 11:36 PM
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
Joined: Oct 2002
Posts: 394
Thanks Randy wink

#182682 01/01/2004 11:47 PM
Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,849
No problem, PT is at Netwerkin a lot so I figured he just needed a little *reminder*.

#182683 01/02/2004 12:09 PM
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.


- Allen wavey
- What Drives You?
#182684 01/02/2004 9:33 PM
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
Joined: Oct 2002
Posts: 394
Allen, I cant use that. I am running 6.3.1.1 and I dont have this:
Code
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

#182685 01/03/2004 2:20 AM
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.


- Allen wavey
- What Drives You?
#182686 01/05/2004 11:33 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
https://www.ubbdev.com/ubb/ultimatebb.php/topic/33/136.html

I believe it'll only work properly on 6.7+


- Allen wavey
- What Drives You?
#182687 01/24/2004 12:20 AM
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
Joined: Oct 2002
Posts: 394
Quote
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?

smile

#182688 01/24/2004 5:26 PM
Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,849
He's at Netwerkin just about everyday. I'll try to remember to remind him this evening.

#182689 01/30/2004 12:34 AM
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
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 smile

#182690 01/31/2004 8:51 PM
Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,849
He should see this .

#182691 01/31/2004 10:25 PM
Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
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. smile

#182692 01/31/2004 10:28 PM
Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
Joined: Nov 2001
Posts: 1,080
Ahh...I see.

#182693 01/31/2004 10:30 PM
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
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.
smile

#182694 02/03/2004 1:29 AM
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
Joined: Oct 2002
Posts: 394
Ops, we were writing posts in the same time, you were little faster though. smile

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

smile

#182695 02/15/2004 8:33 PM
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
Joined: Oct 2002
Posts: 394
Prime, any luck?

#182696 02/16/2004 10:11 PM
Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
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

Page 1 of 3 1 2 3

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
Posts: 70
Joined: January 2007
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
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)