Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2002
Posts: 48
Member
Member
Offline
Joined: Jan 2002
Posts: 48
Issue:

(Was frames, now custom style mod. See update below) wink

Getting UBB to display output in a specific frame of a frameset, with multiple framesets.

I would like to retain the use of frames for a portion of my website, with the UBB displayed in the main frame. However, each forum needs to display in a different frameset, as there are different header and sidebar frames for different forums. I want to keep the separate html files for the frames so that users can modify their own forum frame's content without having access to the CP (with a simple CGI html editor).

If you could set a style so that the requested UBB link became the SRC value of a frameset template, that would solve the problem. Instead of using the header and footer html to wrap the UBB output, you would tell UBB to use a specific frameset page, and put the summary or thread in the "main" frame.

That way, if a user clicks a link to the latest topic from my home page (using Latest Threads), UBB would look at the style for that forum, and sent them to the correct frameset. If a user is looking at a thread in a particular framed forum and clicks a link for a forum with a different frameset, UBB would send them the new frameset for that forum.

Example:

Forum A uses framesetA with headerA.htm and sidebarA.htm.
Forum B uses framesetB with headerB.htm and sidebarB.htm.
Both framesets use UBB output in the frame called "main".

User clicks LT link for forum A on homepage, and gets framesetA.
User in framesetA clicks link for forum B, and gets framesetB (instead of forumB in framesetA)

The frameset would look something like this:
[code][/code]You'd have to have an "if" statement to tell UBB to use target=main within one forum or target=_top if another forum is requested. I'm sure there may be other target conflicts to consider, but I can only think of a few...

Links out of the UBB, but in my domain would be target=_top.
Links out of my domain would be target=_blank

This mod would allow you to use regular styles for some forums, and frames for others. Currently, if you have one forum in a frame and click a link to a non-framed forum, you get the whole page layout within one frame.

Has anybody tried this and/or how hard would it be to mod the style setup to accomplish this?

Thanks,
Getagrip Greg

Sponsored Links
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
Due to IE quirks, the UBB does *NOT* operate properly within a frameset... we advise against using one.


UBB.classic: Love it or hate it, it was mine.
Joined: Jan 2002
Posts: 48
Member
Member
Offline
Joined: Jan 2002
Posts: 48
Charles, any specific information you can share about these IE quirks?

Part of my site's layout really needs to be editable by the end user (a header and a sponsor sidebar). The users (Moderators) are responsible for maintaining their part of the site. Using frames is a fairly easy way to accomplish this (aside from the many target issues).

The UBB Styles html header and footer is too complex and sensitive to allow these users access to the CP. What I need is the ability for the header and footer html variable to call a file from another folder on my site, a user editable file. (edited with a totally separate script.)

That way, I can maintain the forum's style header and footer html safely, and give the user a place to edit the contents of a table cell within the header html.

If vars_style{Header} was a script instead of a string of html, I could use a script to create the html to place in the header.

I'm not a perl coder, but I've been able to do things like modify existing subroutines to get the desired result. This looks like it would be a pretty significant change to the cp_styles code, and likely over my head. But simple for an expert?

I'm thinking I should add two vars to to the %vars_style, $HeaderCustom and $FooterCustom, and have an on/off var $UseCustom that says "use HeaderCustom or use Header". That way, I could have both my standard html in the style *and* custom html. I could turn off the custom html if a user screwed up his contribution to HeaderCustom.
[code][/code]

$HeaderCustom and $FooterCustom would be created by a sub that gets an external file (the custom content) and inserts it into the specified table wrapper. Then that completed html would be written into the $Header var for the specified style.

Anyone want to give it a shot or suggest how I should start?

Thanks and best regards,
Greg Stasko

Joined: Jan 2002
Posts: 48
Member
Member
Offline
Joined: Jan 2002
Posts: 48
Update:

I was able to hack the CP Styles template to add the on/off var for the custom header, and get the CP to generate an updated style file with the new HeaderCustom var.

I was even able to get public_common to spit out the desired header, with:

[code][/code]But sadly frown I could not figure out how to get UBB to include the external html file in place of the standard $Header.

I think I need an extra subroutine in public_common.pl that will process the CustomHeader var.

Here's what it needs to do:

  • Get the html file defined by a path in $CustomHeader
  • Print the contents of that html file in place of var $Header

Guessing I need to use either:
require (file path)
include (file path)
open (FILE)
print (FILE)
or some combination of the above...
Here's a link to my *rough* development document, if you want to see what I've done so far.
http://www.skusaonline.com/test/GGR_Style_Mod_development.txt
I had to revert to the original style setup, 'cause my deadline's right on top of me. But I still need to come up with a solution for the regional forums (news boards). Here's where it's going (test site):
http://www.skusaonline.com/test/template.htm

And here's a link to one of the regional areas that uses frames to display the header, menu, and sidebar. These frames are what I'm trying to output via UBB, but keep the html separate so users can edit them w/o the CP:
http://www.skusaonline.com/test/

Any suggestions greatly appreciated!

Regards,
Greg Stasko
SKUSA Online!


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
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
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)