View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000055 | WackoWiki | action | public | 2007-08-31 15:44 | 2009-08-19 09:39 |
Reporter | administrator | Assigned To | Tann San | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Product Version | 4.2 | ||||
Target Version | 4.3.rc | Fixed in Version | 4.3.rc | ||
Summary | 0000055: Parameter for cluster for {{mostpopular for="/Cluster"}} | ||||
Description | {{mostpopular [for|page="PageName"] [max="Number"] [nomark="1"]}} would be nice ;) | ||||
Tags | No tags attached. | ||||
|
kukutz 06-11-2004 00:25 We'll try to support it =) mb 09-11-2004 09:46 path of pages should also work on subpages Seventh . Have a better life. Get off Wiki to do something that keeps your family happy. But do come back. ;) edited on: 09-11-2004 09:47 mb 04-09-2005 02:41 correct linking on subpages: $this->Link("/".$page["tag"],"",$page["tag"]) <?php if (!$max) $max = 25; if ($max>500) $max = 500; $pages = $this->LoadAll("select ".$this->pages_meta.",hits from ".$this->config["table_prefix"]."pages order by hits desc limit ".(2*(int)$max)); $num = 0; print("<table>"); foreach ($pages as $page) { if ($num<$max) { if ($this->config["hide_locked"]) $access = $this->HasAccess("read",$page["tag"]); else $access = true; if ($access) { // print entry $num++; print("<tr><td> ".$num.". ".$this->Link("/".$page["tag"],"",$page["tag"])."</td><td>". $this->GetResourceValue("Shown")."</td><td>". $page["hits"]."</td></tr>\n"); } } } print("</table>"); ?> |
|
correct linking on subpages fixed -> SVNed with revision 240 |
|
Added two arguments to the most popular action: The "for" argument lets you pick a particular page to start the popularity list from in the page tree. The "dontrecurse" argument tells it to only include the direct children of the specified page. If it is excluded or set to false it will show all children, grandchildren etc for that page. This is the default behavior. Also; minimised the amount of data we pull from SQL for the action as before it was pulling every column and we only need the "tag" one. |
|
mhmm... try this {{mostpopular for="/Doc/Deutsch" max="6"}} should brought the most popular pages of the German doc, or try with for="/Dev/PatchesHacks" seems not work here http://wackowiki.org/Doc/Deutsch but I wanna wanna wanna |
|
I don't see anything on that page that looks like the mostpopular list. Maybe you could give me a bit more information about what you are not seeing as simply saying it does not work tells me nothing. It works for me under various situations so I don't see why it won't here. |
|
click edit -> at the end test page http://wackowiki.org/WikiAdmin/Test/MostPopular |
|
ah, easily spotted the issue. the pages you were supplying had a leading forward slash which was unnecessary i.e. /HomePage/TomsFace while it was actually expecting to see: HomePage/TomsFace I've added a check for a leading forward slash so either version will work now. |
|
NO - the forward slash is like in unix for the absolute path lets say you want show on an subpage /mypage/statistics the mostpopular pages of another cluster /Another/Cluster the issue without forward slash is for relative addressing! this becomes important for instance if you include a page in another, then the path must be absolute and why does the output lists pages that doesnt belong to the cluster and also show results manifolds, did you examine how it was done for backlinks |
|
I'm not a total idiot and I do get what a forward slash at the start symbolises. in sql we have a table called pages. in pages we have a column called tag. tag holds the full path to the page in question i.e. HomePage/TomsFace It does not have a leading forward slash at all as it knows that whatever is at the front of that is a top level page in this case HomePage. You cannot have two pages like this: /HomePage/TomsFace HomePage/TomsFace because they are the same page. it just will not work any other way. You can have: /HomePage/TomsFace !/HomePage/TomsFace if you wrote those links on another page, like if you wrote those two on the HomePage then you'd end up with two links. The first would simply link to TomsFace, the other would link to /HomePage/HomePage/TomsFace. Feel free to open your database up and have a look. Maybe the thousands of wiki pages I monitor across several wikis have somehow escaped the "having a page with a forward slash at the start" rule but I doubt it. oki rant over. I did make a slight oversight on how it worked with links from other pages outside the tree the search takes place in. That has been rectified now. I don't know what result manifolds are so I don't know how to deal with them. Yes I looked at how backlinks was done. It's a similar method but less complex. |
|
update the action on the server so you can see the results bizar some examples working well others not, mhmm but why will setup an example with backlinks to show what I had in mind but I'm a total fool, so be prepared LOL |
|
I don't know why we're seeing those results on your server with this latest version. I can't recreate it on my server. I could with your last set. Can you enable debugging so I can see the SQL code under the page. |
|
set "debug" => "2", |
|
ok, let's give this one a go. It took me a while to work out what might be going wrong but I think I sussed it. Say we have: /HomePage/Animals /HomePage/Animals/Dogs /HomePage/Animals/Cats /HomePage/Animals/Dogs/Food If we did a mostpopular for /HomePage/Animals we would see /HomePage/Animals/Dogs /HomePage/Animals/Cats /HomePage/Animals/Dogs/Food Now if we put a link on the Dogs page back to /HomePage the results we'd get would now be /HomePage /HomePage/Animals/Dogs /HomePage/Animals/Cats /HomePage/Animals/Dogs/Food The problem was that it was seeing links back to other pages outside of itself. It was a similar situation as to why we'd see multiple results of the same page, like the german docs page is a good example. That has links to itself all over the place as HTML anchors. That means that 20 anchors would equal 20 results. I'm hoping it's all taken care of now. |
|
update the server again, looks good with absolute path |
|
relative linking now enabled. |
Date Modified | Username | Field | Change |
---|---|---|---|
2007-08-31 15:44 | EoNy | New Issue | |
2007-08-31 15:44 | EoNy | Legacy | => NEW |
2007-08-31 15:44 | EoNy | Note Added: 0000058 | |
2007-08-31 21:02 | administrator | Legacy | NEW => NPJ |
2007-10-02 00:03 | administrator | Reporter | EoNy => administrator |
2007-10-02 00:03 | administrator | Summary | Parameter for cluster for {{mostpopular for="/WackoDocDeutsch"}} => Parameter for cluster for {{mostpopular for="/Cluster"}} |
2007-10-15 05:20 | administrator | Note Added: 0000142 | |
2007-10-29 14:30 | administrator | Status | new => acknowledged |
2007-10-29 14:30 | administrator | Target Version | => 5.0.0 |
2007-12-12 23:44 | Tann San | Status | acknowledged => assigned |
2007-12-12 23:44 | Tann San | Assigned To | => Tann San |
2007-12-17 02:11 | Tann San | Status | assigned => resolved |
2007-12-17 02:11 | Tann San | Fixed in Version | => 5.0.0 |
2007-12-17 02:11 | Tann San | Resolution | open => fixed |
2007-12-17 02:11 | Tann San | Note Added: 0000238 | |
2007-12-18 05:51 | administrator | Note Added: 0000242 | |
2007-12-18 15:09 | Tann San | Note Added: 0000247 | |
2007-12-18 17:58 | administrator | Note Added: 0000252 | |
2007-12-18 18:04 | administrator | Note Edited: 0000252 | |
2007-12-18 18:33 | administrator | Note Edited: 0000252 | |
2007-12-19 15:53 | Tann San | Note Added: 0000255 | |
2007-12-19 19:31 | administrator | Note Added: 0000257 | |
2007-12-19 20:45 | Tann San | Note Added: 0000258 | |
2007-12-19 21:04 | administrator | Note Added: 0000259 | |
2007-12-19 21:15 | Tann San | Note Added: 0000260 | |
2007-12-19 21:15 | administrator | Note Edited: 0000259 | |
2007-12-19 21:16 | administrator | Note Edited: 0000259 | |
2007-12-19 21:22 | administrator | Note Added: 0000261 | |
2007-12-19 22:00 | Tann San | Note Added: 0000262 | |
2007-12-19 22:01 | administrator | Note Added: 0000263 | |
2007-12-19 22:31 | Tann San | Note Added: 0000264 | |
2007-12-29 10:12 | administrator | Description Updated | |
2008-08-23 14:38 | administrator | Note Edited: 0000242 | |
2008-08-23 14:39 | administrator | Note Edited: 0000252 | |
2009-01-06 16:57 | administrator | Note Edited: 0000242 | |
2009-08-19 09:22 | administrator | Fixed in Version | 5.0.0 => 4.3.rc |
2009-08-19 09:39 | administrator | Target Version | 5.0.0 => 4.3.rc |
2010-03-08 10:09 | administrator | Category | Action => action |