Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-17-2010, 05:52 PM
ajmcce ajmcce is offline
 
Join Date: Jan 2007
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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 :-(
Reply With Quote
  #2  
Old 10-17-2010, 08:44 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #3  
Old 10-17-2010, 08:50 PM
ajmcce ajmcce is offline
 
Join Date: Jan 2007
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #4  
Old 10-17-2010, 11:58 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.)
Reply With Quote
  #5  
Old 10-18-2010, 12:18 AM
ajmcce ajmcce is offline
 
Join Date: Jan 2007
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 :-(
Reply With Quote
  #6  
Old 10-22-2010, 02:06 PM
ajmcce ajmcce is offline
 
Join Date: Jan 2007
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a better place to ask this question? Is this a vbulletin.com question or another forum here?
Reply With Quote
  #7  
Old 10-22-2010, 03:54 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #8  
Old 10-23-2010, 01:38 PM
ajmcce ajmcce is offline
 
Join Date: Jan 2007
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
:-(
Reply With Quote
  #9  
Old 10-23-2010, 02:29 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 10-23-2010, 03:12 PM
ajmcce ajmcce is offline
 
Join Date: Jan 2007
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:31 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04657 seconds
  • Memory Usage 2,257KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete