Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
Had a couple requests for this and threw it together. This essentially removes the 'Hop to:' pulldown and 'Go' button functionality from the bottom of showflat and postlist and makes it a popup menu.

Before pic:

[Linked Image]

After pic (on a different board of course - i can't modify ubbcentral!! laugh

[Linked Image]

Instructions:

Just read the Readme.txt (attached) and do it.

You can fiddle with '$jumpbox = $html -> hop_to(40);' and change the number 40 to your liking. The number 40 signifies the number of characters to display for forum/sub-forum(s), before using the '...' continuation. you'd do this in 2 places. showflat.inc.php and postlist.inc.php. no need to fiddle with the ubbthreads.inc.php class, as that is just the default over there.

This allows for loooong stuff to be trimmed and then the menu doesn't go bonkers width wise..

Good luck.

Notes:

1. you can easily move this menu to the right (over by the pager), but simply editing the tpls. Keep in mind, if there is no right side portal, you might have the popup to wide to fit on screen.
2. you can also duplicate the menus that are on top to down below as well.
3. you may want to edit the language for 'Hop to:' to 'Hop to' to get rid of the colon, if you are anal about it wink

example:

[Linked Image]

once again, it's a simple .tpl mod. I've done it, but am time pressed to post here. I'm quite sure someone could take this example and post those mods as a part of this thread though wink

we have enough tpl gooooos, to be able to slice and dice as needed.

Good luck wink
Attachments
2459-ReadMe.txt (6.58 KB, 28 downloads)
Prolly want to read it ;)
SHA1: 5676cdc8232e61363ee8d1a52cc58ebec72f2bde

Last edited by sirdude; 08/21/2007 11:39 PM. Reason: Updated for 7.2.1
Sponsored Links
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Lookin good wink


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
Thanks SD .. going to apply it now. smile

Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
SD, I got this error:

Fatal error: Call to undefined function: hop_to() in /xxx/xxx/xxx-www/forums/scripts/postlist.inc.php on line 487

This is the line that has the following code:

Code
$jumpbox = $html -> hop_to(40); 


Any ideas?


Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
hop_to function is added new in ubbthreads.inc.php. that's step 1, so either you didn't do that step or you didn't upload the new ubbthreads.inc.php..

:2c:

Sponsored Links
Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
Ok, will try again. smile

Joined: May 2007
Posts: 11
Newbie
Newbie
Joined: May 2007
Posts: 11
Originally Posted by sirdude
hop_to function is added new in ubbthreads.inc.php. that's step 1, so either you didn't do that step or you didn't upload the new ubbthreads.inc.php..

:2c:

I got the same thing last night and figured I applied the mod incorrectly. So I tried again today and got the same action.

On the ubbthreads.inc.php modifications, you basically add your function to the bottom of the file just above the closing "?>" and that pretty much does it?

Get this when clicking on the forum:

Fatal error: Call to undefined method html::hop_to() in /usr/home/dunsire/ubb7test/scripts/postlist.inc.php on line 487

Get this when clicking on the last topic:

Fatal error: Call to undefined method html::hop_to() in /usr/home/dunsire/ubb7test/scripts/showflat.inc.php on line 528

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
no, the hop to is within the html class. so you need to search for:

Code

// #######################################################################
// Do login - Logs the user on
// #######################################################################

and add just above it, the hop_to function. Step 1 had a typo in the Find:

---
---

Bad copy/paste on my part. Its all updated now..

Matter of fact, hop_to essentially obsoletes jump_box and that routine could be deleted. I chose not to for this mod, just in case it might be needed somewhere else.

Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
Oh good ... I tried it three times and got the same error every time. Thanks for updating it SD - will try again. smile

Thanks too for these great mods. You guys who do these mods are fabulous. I can't write code (except HTML) to save my life!

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
It's you (and I) who make the feature request that deserve all of the thanks; if there was nothing to do, we'd have nothing to do wink


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Sponsored Links
Joined: May 2007
Posts: 11
Newbie
Newbie
Joined: May 2007
Posts: 11
Awesome! Works like a charm!

One thing I did notice is the hopto behavour when viewing a topic. I don't know if this is IE7 or what but when I click the "hopto" button I only get the current forum I'm in and there is no table around the pick list, just the current forum and the "Go" button. If I click any where but on the button or list the border shows up.

If I click the pick list I see all of the forums and if I select one the hopto box disappears and I'm still looking at the active topic.

Aw heck, here's a link! crazy

http://ubb7test.bobdunsire.com/ubbthreads.php?ubb=showflat&Number=24#Post24

This is our test site, the live site is still running v7.1.1


Joined: May 2007
Posts: 11
Newbie
Newbie
Joined: May 2007
Posts: 11
Quote
Thanks too for these great mods. You guys who do these mods are fabulous. I can't write code (except HTML) to save my life!

I would also like to say THANKS for the hard work and effort you guys put into these mods.

I just got dropped into the deep end with UBB about a month ago with a decent sized site (11k members). I helped them move from Classic 6.7.0 on Winblows to 7.1.1 on Nix and away from a eastcoast datacenter to mine! smile

I'm currently running a few phpBB sites and after working with UBB I'm considering migrating them over to UBB.
thumbsup

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
looks like you did postlist fine... but the showflat looks like it's using the old jump_box stuff..

not sure why that is happening..

i will recheck the readme, but it looks like you almost got it, but like didn't delete something...

bleh.. dunno yet

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
lol @ winblows..

i wish my OS (z80 operating system) got a title like that! i'd be a billionaire!

wink

ps: looks like (for whatever reason) you are enabling the old jump_box as the popup..

my guess is that you didn't modify showflat.inc.php to call hop_to and are still calling jump_box..

paste from readme:

Code

Open: /scripts/showflat.inc.php

Find:

---
// --------------------
// Give the jumper box
$jumpbox = $html -> jump_box($Board);
---

Replace with:

---
// --------------------
// Give the jumper box
$jumpbox = $html -> hop_to(40);
---

:2c:

Joined: May 2007
Posts: 11
Newbie
Newbie
Joined: May 2007
Posts: 11
Originally Posted by sirdude
looks like you did postlist fine... but the showflat looks like it's using the old jump_box stuff..

not sure why that is happening..

i will recheck the readme, but it looks like you almost got it, but like didn't delete something...

bleh.. dunno yet

Nope, it was me! Sorry about that! I was putting in Gizmo's AdminIP mod and was moving files around and forgot to re-add your bit.

Its working just fine now. smashpc

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
cool [Linked Image]

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
i love being referanced in other peoples mod threads wink


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
You know, the only sugguestion that I have is to use the tdheader class for categories


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
Ok, I got it to work, but the "40" width doesn't change when I change it in the scripts. And my subforums are not showing.

I was so careful, and was real pleased when it worked, but looks like I've done something wrong again. frown

Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
Here's a screencap:

[Linked Image]

I change the menu width in four places, right?

1 place in postlist.inc.php
1 place in showflat.inc.php
2 places in ubbthreads.inc.php


Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
Ok, my husband looked at this, and he says the "count" parameter in the php function "str_replace" (that is used to set the value of $level for the code added to lib/ubbthreads.inc.php in the mod) was introduced in php version 5.0.0. Our server is using a lower php version, so the value of $level in the mod cannot be set.

Also, for some reason, in the new Gallery forum, the Hop To menu didn't appear at the top, but down the bottom where it used to be, was the full menu - sort of like embedded there. Not sure if this is also a PHP version thing.

Anyway, until our host gets their act together to upgrade their PHP, I'll have to abandon this. I will come back to it though. smile

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
i'll change that to be php4/5 compatible. should be that way in the 1st place.

okie dokie Rose, i've made it php4/5 compatible locally. i've also added a little tweak for the continuation char string. right now it is hardwired to '...' . Some peeps might want '+' or whatever, so that's a variable.

i need to cruise to the hospital to pick up a friend and will post the updates in the .zip and readme.txt later on today.

thanks for point that incompatibility out. i miss php4/5 stuff, because of the fact that i'm so hardwired to v5 now.. blush

Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
Oh gee SD, you don't need to do that. I can wait until our PHP is upgraded. We sent in a request this morning.

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
It's best to remain PHP4 compatable; the UBB isn't planning to be PHP5+ for some while now since a large majory of hosts aren't even up to PHP4 yet lol...

Though, at this point, I say that, if your webhost isn't PHP5/Apache2/MySQL5, you should go elsewhere as updates go through pretty fast...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
Updated for php4/5 now. Was an easy change. New readme.txt in initial topic post.

Btw, only place(s) that you would need to change the value from 40 chars to different is in the call to html->hop_to(40) in either showflat.inc.php or postlist.inc.php or both.

No need to change the function itself, as it takes the value you send it. If you don't send it anything. ie: html->hop_to(), the routine will default to 40.

One thing to also note. If your .popup_menu_content class has a width restriction on it, you'll have to consider what to do. My classes have width:auto; on them. :2c:

And to giz-unit. To change the class for the categories is easy peasy too.

Code

$hopCat = "<tr><td class=\"popup_menu_content\"><a href=\"{$config['BASE_URL']}/ubbthreads.php{$var_start}ubb{$var_eq}cfrm{$var_sep}c{$var_eq}$cat\">$cat_title</a></td></tr>";

change that "popup_menu_content" to oh say... "popup_menu_header" and the categories will be classed appropriately. you can of course use tdheader too.. whatever fluffs your flannel wink

keep in mind that there are two instances of "popup_menu_content". the 1st one is for the category loop and the 2nd one is for the forum/subforum loop. you'd be changing the 1st one, most likely.

Thanks for the input(s) peeps..

Enjoy!

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
The problem going to php5 is that some scripts are still not fully compatible with PHP5 frown


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Originally Posted by Ian_W
The problem going to php5 is that some scripts are still not fully compatible with PHP5 frown
Have you actually seen why? It's miniscule, people assume you have global variables on vs defining them individually, takes all of 20 minutes to update a huge script like a *nuke


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
Thanks SD! Will try again tonight. smile

Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
Ok, I got it to work just fine this time, except in the gallery forum (it did some very strange things in there), and not until I had undone it again did I realize that the same changes have to be made to gallery.tpl. So I'll try it again, but I'm sure it will work this time.

There's only one other thing, and I don't think it has to do with the mod - more an IE thing because this doesn't happen in Firefox. See the screencap.

The browser adds this awful side-scrolling scroll bar. Any ideas about that? I'm determined to have this Hopto mod, and that scroll bar thing is the last piece of problem. help
Attachments
2454-hopto.jpg (26.11 KB, 29 downloads)

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
try width:auto for your css classes. i don't know what you have now, but that might be the case.

i also have height:auto as well.

good catch on gallerylist.tpl. i guess i need to add that to the original .zip and readme.txt too.

looks like showgallery.tpl too..

m'kay i will update the readme shortly for the gallery stuff.


Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
SD, which CSS classes? I'm really just learning about CSS, although I can use the UBB ones just fine. Not sure which classes I'd adjust or add the width and height though.

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
popup_menu
popup_menu_content
popup_menu_header
popup_menu_highlight

Those style all your popups. sooo, for example giz wanted to make the catagories stand out from the forums/sub-forums.

he could style the categories with class="popup_menu_header" and the others with "popup_menu_content"

they are all in "Popup menu properties" section of the styles editor in the cpanel.

Also, i'll bet you are using IE ?

Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
Thanks SD. Yes, I'm using IE. The scroll-bar thing doesn't happen in Firefox. I'm not sure if the CSS thing will help, but I'll try it.

Also, I can't find a showgallery.tpl.

You'll be glad to see the back of me, I'm sure. smile


Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
never mind about showgallery.. senior moment smile

i think i have a template fix for you rose. will test on ie7 and ie6, then post here..

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
ok Rose, i found this works..

edit your tpl's and use:

Code
<div id="hopto_popup" style="display: none; height: 350px; width:auto; overflow-x:hidden; overflow-y:scroll;">{$jumpbox}</div>

for the hopto_popup div(s). should get rid of those annoying scrollies wink

Joined: Jul 2001
Posts: 808
Coder
Coder
Joined: Jul 2001
Posts: 808
Quote
postlist.tpl: Find:

---
Code
<div style="float: right">
{$jumpbox}
</div>
this must be removed 2 times!

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
that only occurs 1 time in postlist.tpl

as for gallerylist.tpl, the readme.txt reflects that now!! wink

the readme is also updated with the IE5/6/7 friendly scrollie fix, prompted by Rose's comments

Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
sirdude .. you're the best. smile I'll let you know how I go. Thanks for all your help. smile

Joined: Sep 2006
Posts: 75
Power User
Power User
Offline
Joined: Sep 2006
Posts: 75
SD, it's perfect!! Thanks so much for putting up with me. ((((hugs)))) smile

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
boo, ie, booooo wink


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Page 1 of 2 1 2

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
isaac
isaac
California
Posts: 1,157
Joined: July 2001
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
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)