The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
When a user goes to 'new posts' I want a plugin to execute when the new posts results are displayed. (The plugin displays some php generated text.)
But I don't want it to execute when the user performs a search and gets the results. I see that the template 'search_resultlist' is used for new posts and search results. I can call the plugin on this template but I don't know how to display it for only 'new posts'. Is this possible and how can I do it? |
#2
|
||||
|
||||
![]()
Then do something regarding the do variable.
if ($_GET['do'] == 'getnew') ...... |
#3
|
|||
|
|||
![]()
Hi Lynne
I'm not sure how to use the do variable. When I perform a search the resulting URL is /search.php?searchid=3734120 which doesn't have a 'do' querystring. To get this do variable I tried a couple ways .. I created a plugin and wrote Code:
print_r ($_GET); [searchid] => 3734147 And I added the following in the 'search_resultlist' template Code:
<vb:if condition="$_GET['do'] == 'getnew'">Hello there!</vb:if> Maybe I'm placing the vb code in the wrong place or writing it incorrectly? I don't understand how to access the $_GET['do'] variable when its not in the URL. |
#4
|
|||
|
|||
![]()
For a template conditional for getnew, in the template search_resultlist, you could use:
Code:
<vb:if condition="$criteriaDisplay == 'Type: Posts; New Posts'"> In your plugin you could write: Code:
if ($_GET['do'] == 'getnew') { /////Your plugin code here ///// } |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|