- OpenX Community Forums
![]() ![]() |
May 29 2010, 03:56 AM
Post
#1
|
|
|
Beginner ![]() Group: Members Posts: 2 Joined: 28-May 10 Member No.: 120,531 |
Attached is a modified widget file that I think you should strongly consider adopting into this plugin. The short version is that the function that checks the keys against the names that the plugin is told to listen for and populates the params now also checks the category and sets "category" as the name and the "category name" as the value.
This means you can setup a targeted channel against a site variable with a name of "category" and the value being the category name. This is a feature a client of mine needed since his existing sites, with thousands of posts, was set to a permalink structure that did not allow for a url solution to category targeting. I also noticed several posts here asking for this feature when I was looking for a solution.
Attached File(s)
|
|
|
|
May 29 2010, 11:58 AM
Post
#2
|
|
|
Mentor ![]() Group: OpenX Translators Posts: 3,168 Joined: 18-November 06 From: Germany/Sauensiek Member No.: 13,921 |
Hi Nick, thanks for your contribution. For the upcoming WP 3.0 I have to look into the plugin anyway, so the timing is perfect.
Heiko |
|
|
|
May 29 2010, 01:56 PM
Post
#3
|
|
|
Beginner ![]() Group: Members Posts: 2 Joined: 28-May 10 Member No.: 120,531 |
Heiko,
You're welcome. I should have noted it in comments but the total of the changes made start on line 112 and ends on line 142. It would be easy enough to put in a conditional code to make this only retrieve the categories when told to, a simple check box in the admin screen that saves to a new value, if you wanted. I would like to point out that I am using this on my dev server which I just upgraded to wp3.0 rc1. It is running very well. |
|
|
|
Jun 6 2010, 12:34 AM
Post
#4
|
|
|
Mentor ![]() Group: OpenX Translators Posts: 3,168 Joined: 18-November 06 From: Germany/Sauensiek Member No.: 13,921 |
A new version has been pushed into the plugin repository, should be visible within a couple of hours - from the changelog:
Version 1.2.5 - Tested plugin with WP 3.0 RC2 - allow to add the category of a post into the adrequest (thanks to Nick, edditor) - allow to add the "tags" into the adrequest - don't add the title to sidebar when empty - optionally add a <br /> after a sidebar banner |
|
|
|
Nov 12 2010, 07:09 AM
Post
#5
|
|
|
Beginner ![]() Group: Members Posts: 1 Joined: 12-November 10 Member No.: 150,051 |
I can't seem to make this work. could you please give an instruction on how to set this up?
In the plugin admin in wp I entered 'category' as the category parameter. but then I don't know how to create channels, assign the 'category name' and make it work. when I do that the ad shows every where without taking in account the category limitation so I am doing something wrong. Also what is the code to add in my template if I don't want to use {openx:zoneid} Thank you A new version has been pushed into the plugin repository, should be visible within a couple of hours - from the changelog: Version 1.2.5 - Tested plugin with WP 3.0 RC2 - allow to add the category of a post into the adrequest (thanks to Nick, edditor) - allow to add the "tags" into the adrequest - don't add the title to sidebar when empty - optionally add a <br /> after a sidebar banner |
|
|
|
![]() ![]() |