Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 05 May 2009, 00:37
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Arrow Please help me fix a minor bug in my mod

I have released this mod a few weeks ago:

http://www.vbulletin.org/forum/showthread.php?t=211939

First...

I can't figure out how to get the # to show all threads that begin with a number. I basically want to add a "#" option so that it displays all threads that begin with a number. Problem is, I have no idea what the code/link is supposed to look like.

Fix minor bug...

I've been reported of a minor bug by two installers of my mod. The problem is that when a letter is clicked, it works fine but until you click another page number, it'll lose the effect or "criteria" as some call it, of the letter clicked.

For example, I click the letter A, it'll show the threads that begin with the letter A (which is right), 20 per page by VB's default setting. If you now click any other page number such as page 2 or 3, it'll show the default thread listing/view, for that page - completely losing the criteria of selecting a specific letter.

Thanks in advance for the help
__________________
...............................
Talk Jesus Forums: Christian Chat
games . chat . gallery . bible . videos
18,000 members
Reply With Quote
  #2  
Old 11 May 2009, 15:13
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Would appreciate a hand on this please. Thanks.
__________________
...............................
Talk Jesus Forums: Christian Chat
games . chat . gallery . bible . videos
18,000 members
Reply With Quote
  #3  
Old 04 Jun 2009, 01:56
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Would appreciate help on this. Thank you
__________________
...............................
Talk Jesus Forums: Christian Chat
games . chat . gallery . bible . videos
18,000 members
Reply With Quote
  #4  
Old 04 Jun 2009, 07:35
Dylanblitz Dylanblitz is offline
 
Join Date: Oct 2005
The first part is easy, not sure how to do the second part, although I know what's wrong.

You want to stay away from using # as a value. I would add a line to the style like this

<a rel="nofollow" href="forumdisplay.php?f=$foruminfo[forumid]&letter=num">#</a></td>
Then change the plugin to be this

if($letter == 'num')
{
$hook = " AND LEFT(thread.title, 1) REGEXP ('[0-9]')";
} else {
$hook = " AND LEFT(thread.title, 1) = '$letter'";
}
The second part is happening because you are not adding the letter to the link. You need to add it to the pagenav, probably through the pagenav_complete hook, not sure exactly how you would do it though.

Another thing wrong I see. The page count is off when you select a letter. The page count is still counting all threads, even if they're not shown. So you might have 8 pages shown up top even if you only have 4 threads. I'm not sure if there's a hook to modify the total page count.

Sorry I couldn't help you more.
Reply With Quote
  #5  
Old 04 Jun 2009, 13:06
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Thanks. Your plugin code does not work though, tried it and nothing works.
__________________
...............................
Talk Jesus Forums: Christian Chat
games . chat . gallery . bible . videos
18,000 members
Reply With Quote
  #6  
Old 04 Jun 2009, 17:30
Dylanblitz Dylanblitz is offline
 
Join Date: Oct 2005
Hmm, it works on my dev forum, are you sure it's in there right? I've edited your product xml, try this out.
Attached Files
File Type: xml product-abc-thread-listing.xml (824 Bytes, 10 views)
Reply With Quote
  #7  
Old 05 Jun 2009, 05:04
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Odd that works. Thanks Dylan.

Hopefully someone else can figure out the pagination problem.
__________________
...............................
Talk Jesus Forums: Christian Chat
games . chat . gallery . bible . videos
18,000 members
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 20:21.

Layout Options | Width: Wide Color: