Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
My first hack for UBB... So please don't go too hard on me wink

Name: Forum Intro Display Mod

Description: If you have a Forum Intro, a box named "UBB Announcements" will be displayed, containing the Forum Intro text. When you remove the Forum Intro text, the "UBB Announcements" box will disappear. "UBB Announcements" text (see screenshot) controllable via CP (Mod Wordlets).

Screenshots:
With Forum Intro text: http://www.iphq.co.uk/ubbhacks/forumintro_with.jpg
Without Forum Intro text: http://www.iphq.co.uk/ubbhacks/forumintro_without.jpg

Download: ZIP File (with image) or TXT File (without image)

Requirements: UBBâ„¢ 6.3 (may work on earlier versions), Mod Wordlets DevKit

Bug reports/comments/questions/suggestions/complaints/hate mail/death threats in this thread, please... I really do appreciate them smile

Sponsored Links
Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
[EDIT: Double-posted... Went to press Edit but actually pressed Quote. Bah. Damn that Quick Reply with Quote button... -_-;;]

Joined: Nov 2000
Posts: 652
Member
Member
Offline
Joined: Nov 2000
Posts: 652
Nice work/idea, all looks good exept you need to incorporate XHTML into it to keep the validation. Other then that nice work. thumbsup

Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
Ahh, yes, forgot about making it XHTML-compliant... I'll do that now. Thanks Fuzion smile

(BTW, is every XHTML tag supposed to end in /> ? It's been ages since I've done this frown )

Joined: Nov 2000
Posts: 652
Member
Member
Offline
Joined: Nov 2000
Posts: 652
No, just your br's, img's also on img's you have to have an alt and border tag. There are also some others, but they are not in your hack, so not worth listing.

Sponsored Links
Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
Got it, thanks smile

ZIP/text file updated.

Joined: May 2001
Posts: 6,708
Member
Member
Offline
Joined: May 2001
Posts: 6,708
Hey, I just noticed your using a similar design to what I have at my forum. Actually, it's exactly the same.

Joined: Feb 2000
Posts: 4,625
Member
Member
Offline
Joined: Feb 2000
Posts: 4,625
Actually, any tag without a closing tag needs to end with a slash.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
nice work smile

here's a little prime on xhtml:
https://ubbdev.com/db/ultimatebb.php?ubb=get_topic;f=2;t=000012


- Allen wavey
- What Drives You?
Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
OK, thanks Allen.... I'll get it all sorted now. smile

Sponsored Links
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Good work, but if I may offer a better idea... [code][/code]Then it uses the correct border for the table, and it removes 5% - it makes it look ugly in big screens - and replaces with... hmm... 20.

BTW, it's ubb_forum_summary.cgi, not .pl.

Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
Thanks LK smile

I thought about using $TBT and $TBB, but then I realised I didn't know how to use them frown

Both files updated, thanks again. smile

Joined: Aug 2001
Posts: 50
Member
Member
Offline
Joined: Aug 2001
Posts: 50
I was curiouse, I have a paypal donations button that I would like to put in place of the forumintro.gif. It has some code that comes with it. Would this work?

Code
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="item_name" value="Maintain Team Kindred and Servers">
<input type="hidden" name="return" value="http://www.teamkindred.com">
<input type="hidden" name="cancel_return" value="http://www.teamkindred.com">
<input type="image" src="https://www.paypal.com/images/x-click-but04.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">

Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
Add at the end, and it should work fine smile

Joined: Sep 2002
Posts: 15
Junior Member
Junior Member
Offline
Joined: Sep 2002
Posts: 15
Great mod ! However, I think I may have done it wrong. Everything works great except for there is not a page break between the "Announcement" Table and the one above it. Look at the forum homepage to see what I mean:

http://forum.garagelan.com

Think it's fixable ?

Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
Of course smile

public_forum_summary.pl, find:

Quote
code:
Code
$forum_intro_mod

Add above:

code:
[qb]
Code
<img src="$vars_config{NonCGIURL}/blank.gif" height="10" width="5" alt="spacer" />
[/qb]

Joined: Dec 2001
Posts: 699
Member
Member
Offline
Joined: Dec 2001
Posts: 699
$TBT = the opening
$TBB = the closing


If you still didn't know...

I wrote something like this for myself a while ago - where it just adds the table when there is text. For a month or so I had separate HTML templates :rolleyes: smash
Good work.

Joined: Sep 2002
Posts: 15
Junior Member
Junior Member
Offline
Joined: Sep 2002
Posts: 15
Absolutley PERFECT CTM ! You are the king ! heh, that was a very quick response too. Thanks so much smile

Joined: Aug 2001
Posts: 50
Member
Member
Offline
Joined: Aug 2001
Posts: 50
Thank you CTM for replying...

I replaced the img src for froumintro.gif with the code I posted before but it did not work.

Am I to replace everything between the TBT and TBB with just the code?

Joined: Aug 2001
Posts: 50
Member
Member
Offline
Joined: Aug 2001
Posts: 50
*bump

Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
No, just replace the line beginning


With the code you posted, plus a at the end.

Could I have a link to your UBB please?

Joined: Aug 2001
Posts: 50
Member
Member
Offline
Joined: Aug 2001
Posts: 50
Team Kindred Message Boards

^^ Above is the link to the message boards.


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)