It would be nice if one could see all links that are managed by Weblink on one page. This is similar to the feeds-view from the import-module where items from each feed is gathered in one block.
This is just another view on the links that are stored within the Weblink-module. Now one has to click through each category, but then one can also get all links on one page. Each category gets a block on that page.
Even better: show the 5 most popular links within one category and have one link below that leads to an overview for that directory. In that way one can have the best of a startpage and a directory.
See www.startpagina.nl to get an idea of what I am suggesting. This page lists all categories and has a link below each category to see more from that category.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | weblink_7.patch | 2.12 KB | shane |
Comments
Comment #1
arsart commentedI did something with such needs like yours on my site...
but it was special top100 page wich selected weblinks only from one taxonomy term.
So, i`m not strong enough in php and mysql i`ve tried to create a page with all links but get frustrated with errors near sql insertions and first of all i need to set up a "pager" for such content because rendering 1000 f links (in my case) i think will be deathfull for my pc.
For example: I just create a node with php inside for my Russian Top 100
As you see i`ve called for term_node to select all nodes(weblink) with the term number 17 and sort them descending with limitation - 100 items.
So you don`t need this(term_node) i think but truth is out there!
First problem when making "all links page" is to call for "pager"!
Look in weblink.module code:
Near string 763 in function theme_weblink_page_view...
I think we can do it, but don`t no how to use wright sql request.
When i tried to do this, i can`t set up a pager and get frustrated with limitations.
Let`s try together!
P.s.
I forgot... i`ve created small block with selection of random weblink from one taxonomy term - it`s funny:)
Comment #2
shane commentedI wanted the same thing. So attached is a patch (weblink.patch) which was written agains the 4.5.2 code base.
It adds a new _page() hook called "all", when called, it dynamically iterates over all taxonomy vocabulary types of "weblink", then iterates over each Term ID within each vocabulary. It then builds a single page output of all weblinks in your system.
NOTE - there is no pager() support written into this ... if someone modifies this code to support the pager() features, please post it here, I'd like to have that patch.
I did a fair amount of testing, but my testing only was based on my own environment (4.5.2) and my limited set of weblinks listings. Please implement/test carefully.
To patch, simply copy the patch to your modules/weblink/ directory, and do "patch -c < weblink.patch". This applied cleanly for me on two test systems (both 4.5.2) with the weblink version of:
// $Id: weblink.module,v 1.67.2.5 2005/02/10 21:17:03 syscrusher Exp $
Changes were made to the weblink_page() function to add the new "all" switch. Changes were also made to the theme_weblink_page_view() function to support this patch.
To invoke, simply go to:
http:///www.example.com/weblink/all
as your URL string. You can fairly easily change the weblink_page() function Switch/Case statements to make the "all" switch statement the "default" statement. Then you don't need the trailing "/all" URL path part.
v/r
Shane
Comment #3
Mad Maks commentedComment #4
Bèr Kessels commentedI am about to mark this wontfix. But that depends on your input, really.
This module will not go into the 4.6 brach as it is. We are rebuilding it from scratch.
4.6 is around the corner, so I am dropping support of this module.
So unless someone with CVS access volunteers to take over this 4.5 branch, this is a won't fix.
Also:
- patch #2 is non standard, please use the -u (unified) flag when pathcing)\
- You add a lot of HTML to your code: that is bad.
- Could you not rather make this a very small module?
Comment #5
drewish commentedSeeing as there's been no feedback in the last 9 months, I'll go ahead follow through on Bèr threat to mark this as won't fix.