I'm in need of some advice while I remodeling my display links pages.
I added a link type called "Sponsor", and then I created an image to display next to the link title, like the current star which is used for "recips".
Then I added a line to the "linkbit.tpl" to render it on the display links page for sponsored links.
I've got the default sort order set to display "Sponsors" first, then "Recips", and then "Standard".
What I would like to do now is strip everything off the the "Standard" links except for the link title, and the link description, and they will be displayed last, preferable in a list fashion.
I'm thinking this might encourage people to submit a Reciprocal or Sponsoring link, since they will have much nicer and detailed listings.
But I'm not sure of the best way to go about it. Create a whole new linkbit file, rename it and call it from the standard links?
Or...make the adjustments in the current linkbit.tpl to do it.
I'd just make the adjustments in the displaylinks.tpl, search.tpl and searchall.tpl. The purpose of the link bit is to be able to control all the types in the same spot. Since you want them different enough that using conditionals to differentiate them isn't practical, there's no point in the link bit for you.
Just use
<ul> <!-- BEGIN REGULAR --> <li><a href="{TRACKLINKURL}">{LINKTITLE}</a> - {LINKDESCRIPTION}</li> <!-- END REGULAR --> </ul>
directly.
Though if you expect to change it a lot, using new link bits would allow you to update displaylinks and search at the same time.
I'm not sure whats causing it, but that code snippet makes a a duplicate listing for any recips in a category and lists them below. And no regular links
Any category without a recip, and the code is ignored, and no regular links.
Nope, something is wrong somehwere. I've tried everthing I could come up with. And all it does it copy the sponsors and list them again at the bottom.
It shows that there are x amount of regular links in the category stats box though.
Something else I just noticed, even though my new link type "Sponsor" is edited into both the search and searchall templates....I can search a sponsor link by the exact name of the link and the results come up zero.
It's actually BEGIN/END REGULAR LINKS in the displaylinks template, replacing the already-existing copy. The code I gave would be right for the search links page.
Post the content of any templates that aren't working for you.
At the risk of looking like an idiot, I got to add that I never realized the browser read and utilized the comments like that. I never imagined that would effect it.
I've seen some helacous comments in scripts and always assumed they were more or less for the authors.
Guess I learned something.
My only issue now is that my sponsor links still dont show up in a search results. I dont know if you'd rather I opened a new topic, verses tainting this one with a different subject or not.
After doing some more trial and error, I've discovered that Recips, and Sponsors both are excluded from any search results.
I know now the reason has to be staring me right in the face, but I can't for the life of me see it. Paul would you rather I created a new topic on this?
Must be a setting issue for sponsor. You're sure "sponsor" is the official type name listed at Admin -> Settings -> Links? Have you selected to mix types or not? On the sponsorship page, have you selected to separate sponsors?
Comments on Remodeling "displaylinks.tpl"
Forum Regular
Usergroup: Customer
Joined: Apr 18, 2006
Total Topics: 28
Total Comments: 103
I'm in need of some advice while I remodeling my display links pages.
I added a link type called "Sponsor", and then I created an image to display next to the link title, like the current star which is used for "recips".
Then I added a line to the "linkbit.tpl" to render it on the display links page for sponsored links.
I've got the default sort order set to display "Sponsors" first, then "Recips", and then "Standard".
What I would like to do now is strip everything off the the "Standard" links except for the link title, and the link description, and they will be displayed last, preferable in a list fashion.
I'm thinking this might encourage people to submit a Reciprocal or Sponsoring link, since they will have much nicer and detailed listings.
But I'm not sure of the best way to go about it. Create a whole new linkbit file, rename it and call it from the standard links?
Or...make the adjustments in the current linkbit.tpl to do it.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
Yes, I have different displays for each link type I have and I created a whole new linkbit file for each link type. That to me is the easiest way.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I'd just make the adjustments in the displaylinks.tpl, search.tpl and searchall.tpl. The purpose of the link bit is to be able to control all the types in the same spot. Since you want them different enough that using conditionals to differentiate them isn't practical, there's no point in the link bit for you.
Just use
directly.
Though if you expect to change it a lot, using new link bits would allow you to update displaylinks and search at the same time.
Forum Regular
Usergroup: Customer
Joined: Apr 18, 2006
Total Topics: 28
Total Comments: 103
I'm not sure whats causing it, but that code snippet makes a a duplicate listing for any recips in a category and lists them below. And no regular links
Any category without a recip, and the code is ignored, and no regular links.
Forum Regular
Usergroup: Customer
Joined: Apr 18, 2006
Total Topics: 28
Total Comments: 103
Nope, something is wrong somehwere. I've tried everthing I could come up with. And all it does it copy the sponsors and list them again at the bottom.
It shows that there are x amount of regular links in the category stats box though.
Something else I just noticed, even though my new link type "Sponsor" is edited into both the search and searchall templates....I can search a sponsor link by the exact name of the link and the results come up zero.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
It's actually BEGIN/END REGULAR LINKS in the displaylinks template, replacing the already-existing copy. The code I gave would be right for the search links page.
Post the content of any templates that aren't working for you.
Forum Regular
Usergroup: Customer
Joined: Apr 18, 2006
Total Topics: 28
Total Comments: 103
That did it right there Paul.
At the risk of looking like an idiot, I got to add that I never realized the browser read and utilized the comments like that. I never imagined that would effect it.
I've seen some helacous comments in scripts and always assumed they were more or less for the authors.
Guess I learned something.
My only issue now is that my sponsor links still dont show up in a search results. I dont know if you'd rather I opened a new topic, verses tainting this one with a different subject or not.
Forum Regular
Usergroup: Customer
Joined: Apr 18, 2006
Total Topics: 28
Total Comments: 103
After doing some more trial and error, I've discovered that Recips, and Sponsors both are excluded from any search results.
I know now the reason has to be staring me right in the face, but I can't for the life of me see it. Paul would you rather I created a new topic on this?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I never realized the browser read and utilized the comments like that.
The browser doesn't. WSN Links does.
Just post your search.tpl and I'll see what the issue is.
Forum Regular
Usergroup: Customer
Joined: Apr 18, 2006
Total Topics: 28
Total Comments: 103
Thanks Paul
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
You've got two <!-- BEGIN SEARCH links RESULTS --> spots there. Remove the second one.
Try
Forum Regular
Usergroup: Customer
Joined: Apr 18, 2006
Total Topics: 28
Total Comments: 103
Thanks Paul
Wow, I'd have thought that as many times as I compared templates I would have caught that
But that still didnt seem to fix the whole issue. Recips show up in search results now but the Sponsor links are still not included.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Must be a setting issue for sponsor. You're sure "sponsor" is the official type name listed at Admin -> Settings -> Links? Have you selected to mix types or not? On the sponsorship page, have you selected to separate sponsors?
Forum Regular
Usergroup: Customer
Joined: Apr 18, 2006
Total Topics: 28
Total Comments: 103
Sponsor is the official name and type.
Types are mixed, yes
And the sponsorship setting was set to sperate sponsors, and I changed it to "no"
With that being the only change, it seems to work. Sponsors are coming up in the search results now.
I appreciate the help.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Works for me with the sponsor separation on, maybe the sponsor type isn't in your "search links" (search.tpl) template.