The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Lost This In 4.x upgrade - Search refresh
i had a user defined variable set up in 3.x and the following code was in the head tag for the search results.
Code:
<if condition="$action == 'getnew'"><META HTTP-EQUIV="Refresh" CONTENT="<if condition="$bbuserinfo['field7'] != ''">$bbuserinfo[field7]<else />60</if>;URL=http://ForumsADDRESS/search.php?do=getnew"><else /></if> <if condition="$action == 'getdaily'"><META HTTP-EQUIV="Refresh" CONTENT="<if condition="$bbuserinfo['field7'] != ''">$bbuserinfo[field7]<else />60</if>;URL=http://ForumsADDRESS/search.php?do=getdaily"><else /></if> This has been working for years. For the life of me I cannot get it working on 4.x What am i missing? So frustrated :-( |
#2
|
||||
|
||||
In VB4 the IF conditionals changed a little... they would now be:
Code:
<vb:if condition="$action == 'getnew'"><META HTTP-EQUIV="Refresh" CONTENT="<vb:if condition="$bbuserinfo['field7'] != ''">$bbuserinfo[field7]<vb:else />60</vb:if>;URL=http://ForumsADDRESS/search.php?do=getnew"><vb:else /></vb:if> <vb:if condition="$action == 'getdaily'"><META HTTP-EQUIV="Refresh" CONTENT="<vb:if condition="$bbuserinfo['field7'] != ''">$bbuserinfo[field7]<vb:else />60</vb:if>;URL=http://ForumsADDRESS/search.php?do=getdaily"><vb:else /></vb:if> |
#3
|
|||
|
|||
Thanks but I actually tried that. It appears like the action is lost on the search sharing or something. The if statement doesnt error but also doesnt trigger as true.
I had the search sharing on the 3.x site though. Should I be looking for something other than action? |
#4
|
||||
|
||||
Sorry I never knew/played around with actions, I just saw the conditions were wrong for 4.0...
I don't know if it's available but HTTP_Referrer (or whatever it's called) would supply the info you needed (the URL that called the page.) |
#5
|
|||
|
|||
Thanks... I was looking for something with that but cant seem to put the missing pieces together.
This was one of the key features in my 3.x forums. Made a huge difference in usability and traffic. Hoping someone here can come up with the 4.x equiv. sigh --------------- Added [DATE]1287436340[/DATE] at [TIME]1287436340[/TIME] --------------- Still cant seem to get this to work. Seriously regretting upgrading now :-( |
#6
|
|||
|
|||
Is there a better place to ask this question? Is this a vbulletin.com question or another forum here?
|
#7
|
||||
|
||||
I would try the VB4 forums here either general request or programming discussions. (one or the other, not both.)
--------------- Added [DATE]1287769254[/DATE] at [TIME]1287769254[/TIME] --------------- I took another look at search.php and there's no reason this shouldn't work but you logic was a little tough to follow... this is simpler and should produce the same results... try it... Code:
<vb:if condition="$action == 'getnew' AND $bbuserinfo['field7'] != ''"><META HTTP-EQUIV="Refresh" CONTENT="$bbuserinfo[field7];URL=http://ForumsADDRESS/search.php?do=getnew"></vb:if> <vb:if condition="$action == 'getdaily' AND $bbuserinfo['field7'] != ''"><META HTTP-EQUIV="Refresh" CONTENT="$bbuserinfo[field7];URL=http://ForumsADDRESS/search.php?do=getdaily"></vb:if> |
#8
|
|||
|
|||
I appreciate the ongoing effort.
This doesnt return true so nothing shows. to be clear I am adding this to the search_resultslists template. I also put in a comment <!--Rightplace--> above it to be absolutely sure I am in the right place. the comment shows but nothing ever shows in the if statement. Have you managed to get this to work on a forum where I could see it running? I would like to believe its me but it just appears the action value is being lost in the redirect to the search results page. :-( |
#9
|
||||
|
||||
OK this is weird... I turned on Template Names in HTML comments (vbulletin options -> general settings) so I could see what template was being used...
I put the code into search_resultlists without the <if> conditions and it still wasn't being displayed. Turning on the template names it revealed that when there are no new posts VB uses the "Standard Error" template not the search_resultlists template... So if you happened to have no new posts it's a different template... That code should still work if there are undread posts though... can you confirm this? My VB4 install is just a private/test install so I can't link it, sorry. |
#10
|
|||
|
|||
Yeah, interesting about the error. But I was able to get it to display on search_resultslist <!--I am here--> on that template will show that for you.
I also also go it to fire (in a broken way) when I changed vb:if condition="$action == 'getnew' to vb:if condition="$action = 'getnew' But that just always returned true on both conditions. Frustrating only because it continues to work happily on the 3.x forums. Still trying. I would have to anticipate the error page issue for no new posts but only after I can get it working again on the search results when there is a positive result. About to punt and have the new posts go to a page outside the forums that uses a frame at 100% and uses the variable passed to determine how often to refresh the whole HTML frameset. All I would have to do is get the field5 value passed as a variable in the url for new posts. I really dont want to go that way though. That is such a departure from the right way of doing it. Still appreciating your interest in this solution. This was an invaluable addition to my members and my page count as well. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|