![]() |
0-9 Link?
Hi folks. Need some little help here.
I have this mod I released that shows an ABC link nav menu for any specific forum the code is placed into. https://vborg.vbsupport.ru/showthread.php?t=211939 The letters are linked like this: <a rel="nofollow" href="http://www.yourdomain.com/forumdisplay.php?f=2&letter=a">A</a> However, I'd like to add another link for numbers, but one link for any number: 0-9 and the link would be "#" not "0-9". Clicking the link would show all threads that begin with any number. How can I achieve this? Thanks. |
I don't remember the code for that one, but at some point it hooked into a query with code like :
where $something = $letter You'll need to do a conditional. If $letter == '#', your query is going to look like: where $something BETWEEN 0 AND 9 I'm rebuilding my computer at the moment, so I didn't look at the mod. If you need more help, I'll reinstall that and take a second look. Also, I didn't test it, but in theory it should work. :) |
Thanks Eddie, but I don't know anything about programming past the assistance I was given. If you can figure it out, great thanks.
|
Untested...so try it on a test install first:
PHP Code:
|
Thanks, but what am I supposed to do with that code? Where does it go in the plugin file?
|
That's the updated code. It replaces what's in the plugin.
Also, I looked at the vbseo version, and it doesn't look like it was changed (except that it uses the correct hook). So, I'm wondering if there's either a change that didn't get picked up with the plugin, or if there really needs to be two different files. |
Thanks Ed. Still confused though.
The plugin now is this: Code:
<?xml version="1.0" encoding="ISO-8859-1"?> Code:
<?xml version="1.0" encoding="ISO-8859-1"?> --------------- Added [DATE]1240808021[/DATE] at [TIME]1240808021[/TIME] --------------- Just wanted to give you a heads up. Tested your code on a fresh install, non-vbseo. It always displayed all threads regardless of the letter clicked. |
This line is incorrect (PHP Tags "fix" it):
$vbulletin->input->clean_GPC('r', 'letter', 'TYPE_STR); Change it to: PHP Code:
|
Quote:
Quote:
Quote:
|
Thanks, that works now.
I have two issues now: One, I'm trying to figure out the proper code replacement for "forum-path" so a person can copy/past this into forumdisplay template to use the mod globally, not per forum (as I currently have it linked directly to one specific forum). Example: http://www.talkjesus.com/scriptural-bible-answers/?letter=a" That's the link for letter A. What should be the vbseo replacement for the forum title/path which for me here is "scriptural-bible-answers"? My vbseo panel shows [forum_title] I tried that like this, it did not work. Talk Jesus | Christian Forums & Chat - Powered by vBulletin[forum_title]/?letter=a" I even added a $ before [forum and still does not work. Just redirects back to home page. Second question is, I'd like to add a 0-9 # link as well, before the letter A table column. Example: Scriptural Bible Answers - Talk Jesus | Christian Forums & Chat So I want a link like this: "0-9" The question is, how can I properly link it so it shows all threads in that forum that begin with any number? What would the link code look like for a singe link for "0-9" or better yet, just "#"? Thanks! --------------- Added [DATE]1240864909[/DATE] at [TIME]1240864909[/TIME] --------------- Would appreciate if anyone can help me on this, thanks. I'm trying to make the template versions to one version, vbseo or non-vbseo since vbseo changes it automatically. Regarding 0-9 numbered threads listing: I tried this, does not work, shows no threads but I do have one thread that begins with a letter, "144,000..." Code:
<a rel="nofollow" href="http://www.talkjesus.com/scriptural-bible-answers/?letter=#">#</a> I'm using this in a test forum (fresh install) without vbseo Code:
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center"> |
All times are GMT. The time now is 05:14 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|