Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 21 Jun 2007, 11:09
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Real name: Call me X
Conditonal Help

I am trying to create a conditional to use for the thread prefix hack. I would use two prefixes, one called members and one called guests. If the prefix is guest, i want guests to get a pop up asking them to register, or be redirected to the register.php.

If your familiar with the prefix hack you know the prefix itself can not have HTML mark up, you have to put it in the prefix HTML mark up box ( see screen shot here)

So what kind of mark up could I use?


I got as far as something like

<if condition="({1} == guest (then) $bbuserinfo, 1")><else><if condition="({1} == Members (then) !$bbuserinfo, 1")>

I know that is slopy and i could not think of the proper conditional to use for then, so atleast I tried. If some one could clean that up much appreciated.
Reply With Quote
  #2  
Old 21 Jun 2007, 11:27
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
I'd say the easiest way would be to just edit the appropriate Thread Prefix plugins. There are 7 "Display Prefix" plugins for each location it shows the Thread Prefix in though..

For example in "Prefix: Display Prefix in Front of Title (Thread)" plugin you could change
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Or something.. Haha. I'm not exactly a pro at this stuff though, so I might not be doing it right. Maybe give that a try though!

EDIT: Thinking about it.. I realized this would print the error for every thread prefix that should be on the page though. Might want to insert it somewhere else?

EDIT #2: Although I guess if you would try doing it your way by inserting it into the Prefix Markup box, it would be executing the code for every instance of the thread prefix, too. lol.

EDIT #3: I just realized the plugin in my example was for SHOWTHREAD... not FORUMDISPLAY. lol. I need to lay off the caffeine. The right plugin might be "Prefix: Generate Prefix List (Forumdisplay)"

Last edited by TheMilkCarton : 21 Jun 2007 at 11:47.
Reply With Quote
  #3  
Old 22 Jun 2007, 08:37
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Real name: Call me X
One thing i notice is in your code there is no checks to make the prefixes see weather a person is a guest or a member.
Reply With Quote
  #4  
Old 22 Jun 2007, 08:40
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Check the first line.

I'm not saying that will work (since that's not even the right plugin) but I was just using *any* Thread Prefix plugin to get the point across. I didn't exactly spend a lot of time thinking about it. haha.
Reply With Quote
  #5  
Old 22 Jun 2007, 09:00
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Real name: Call me X
I was told this can all be done via the HTML mark up so I think your code is going to deep in the first place.

This cant be to complicated but what about something like

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by Xplorer4x4 : 22 Jun 2007 at 09:06.
Reply With Quote
  #6  
Old 22 Jun 2007, 10:55
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Well, what I was trying to explain is that if you were to use a JavaScript alert in the Prefix Markup, it's going to be executing it for every prefix on the page. I don't think 20 popups will be very user friendly? I can't be certain this will happen as I don't know the ins and outs of the code, but I'd say it's more than likely.

Alternately, you could try:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I'm honestly not sure if the link will parse correctly, so you could also just do this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


EDIT:
I think you're going to have to alter the plugins. Sorry. It didn't know what to do with the variables I used, so they'd need to be added into the plugin anyway.. OR whoever said conditionals would work in that markup box was wrong. Sorry.

Last edited by TheMilkCarton : 22 Jun 2007 at 11:02.
Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
[TXT] & [HTL]Adding OS specific Template conditonal. neocorteqz vBulletin 3.0 Full Releases 5 14 Mar 2005 07:36

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 00:27.

Layout Options | Width: Wide Color: