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:
After pic (on a different board of course - i can't modify ubbcentral!!
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
example:
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
we have enough tpl gooooos, to be able to slice and dice as needed.
Good luck
Last edited by sirdude; 08/21/200711:39 PM. Reason: Updated for 7.2.1
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
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.
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.
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!
I'm currently running a few phpBB sites and after working with UBB I'm considering migrating them over to UBB.
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.
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..
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...
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.
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
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.
The problem going to php5 is that some scripts are still not fully compatible with PHP5
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
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.
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.
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.