Remodeling "displaylinks.tpl"
Changing the layout inside categories
Version: 5.0.68
URL: http://finsandfur.net
|
finsandfur
Experienced Usergroup: Customer Joined: Apr 18, 2006 Total Topics: 27 Total Posts: 94 |
Posted 09/13/09 - 11:37 AM:
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. |
|
babrees
Expert Usergroup: Customer Joined: Aug 19, 2005 Location: England Total Topics: 392 Total Posts: 1287 |
Posted 09/13/09 - 12:50 PM:
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. |
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 09/13/09 - 5:00 PM:
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> 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. Edited by Paul on 09/13/09 - 5:03 PM |
|
finsandfur
Experienced Usergroup: Customer Joined: Apr 18, 2006 Total Topics: 27 Total Posts: 94 |
Posted 09/14/09 - 1:44 PM:
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. |
|
finsandfur
Experienced Usergroup: Customer Joined: Apr 18, 2006 Total Topics: 27 Total Posts: 94 |
Posted 09/14/09 - 4:11 PM:
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. |
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 09/14/09 - 11:12 PM:
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. |
|
finsandfur
Experienced Usergroup: Customer Joined: Apr 18, 2006 Total Topics: 27 Total Posts: 94 |
Posted 09/15/09 - 2:39 AM:
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. |
|
finsandfur
Experienced Usergroup: Customer Joined: Apr 18, 2006 Total Topics: 27 Total Posts: 94 |
Posted 09/15/09 - 6:37 PM:
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? |
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 09/15/09 - 7:50 PM:
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. |
|
finsandfur
Experienced Usergroup: Customer Joined: Apr 18, 2006 Total Topics: 27 Total Posts: 94 |
Posted 09/16/09 - 3:00 AM:
Thanks Paul {NAVIGATION}
|
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 09/16/09 - 3:38 PM:
You've got two <!-- BEGIN SEARCH links RESULTS --> spots there. Remove the second one. Try {NAVIGATION}
|
|
finsandfur
Experienced Usergroup: Customer Joined: Apr 18, 2006 Total Topics: 27 Total Posts: 94 |
Posted 09/17/09 - 2:49 AM:
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. |
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 09/17/09 - 10:27 PM:
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? |
|
finsandfur
Experienced Usergroup: Customer Joined: Apr 18, 2006 Total Topics: 27 Total Posts: 94 |
Posted 09/18/09 - 8:10 PM:
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. |
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 09/25/09 - 8:13 AM:
Works for me with the sponsor separation on, maybe the sponsor type isn't in your "search links" (search.tpl) template. |
Sorry, you don't have permission to post. Log in, or register if you haven't yet.

Print