Sorting by number of likes on page in confluence - sorting

I am trying to sort the child pages of my confluence instance based on the number of likes to each child page of a parent page.
Example:
Page A as the root page.
Page B, C, D, E, F and so on are the child pages of page A. There is a sorting option to see the links of these pages on page A with default sorting alphabetically. What I like to achieve is to promote most liked page on top of the list.
Can someone help?
Regards

Out of the box Confluence doesn't have this feature at all and as far as I know, there is no third party plugins that sort pages base on popularity in page tree. You may come up with your own plugin for this feature as you can grab the most liked pages from database.

Related

Using one Wix Dynamic Page for various entries in the site menu

I am doing a site in Wix.com so my wife can maintain it without my input. The draft site is live at:
http://www.wingspan.info
IMPORTANT: The wife is not a techie.
Essentially, the site displays our art work in galleries of paintings, etc, filtered by artist.
I have coded one page, then duplicated that to create the galleries and filter the WixDataQuery according to Andrew or Helen and Categories like Painting, Drawing, Sculpture, iPad Art, etc. Also, where we have exhibited (Exhibitions menu) some of our paintings.
All working, but any change to design and I have to change 15 pages...
So, it now strikes me that it would be more efficient to design one dynamic page, and set up the menu to display the different categories, as it is set up in the live site:
However, I can't find any documentation that shows how to use just the one dynamic page rather than my coded page duplicated to produce 12 different pages. Not clever...
Any suggestions / tutorials where I can find how to do this?
Thanks!
Basically, you want to add the Content Manager to your site if you haven't already, and then set up a collection with all of your data in it. One row per eventual "page" that you want.
Next, you can take the page you already designed and convert it to a dynamic page. It will then have a dataset on the page which you need to connect to various elements on the page through their connect buttons.
Finally, you'll need to edit your menu to point to the various instances of your dynamic page instead of the regular pages you have them pointing to now.
You can read all about how dynamic pages work here and here.

Extending pagerank algorithm

We know page rank algorithm is the random surfer, which can browse hyperlinks or do random teleports. Lets imagine a scenario where we want to extend this where consider the option for the random surfer to use a "back button of the browser" which takes him to the back page (i.e page where he came from. However, the random surfer is not allowed to use this option recursively. So, once he used back button he has to either click a link or teleport to new page. Furthermore, we consider back button to be used with certain probability 'p'.
Note: we have to restrict user not to use back button recursively.
I was wondering how can we extend the existing page rank algorithm where a user can go from one page to next page with probability (1/number of outlinks) or teleport with probability alpha.
Any idea or link for further reading would be appreciated. I tried to google "pagerank with backlink" but couldn't find good information.
PageRank relies on links between pages. Clicking on the back button is not creating a link between pages. So if you go from page A to page B, there isn't necessarily a link from B to A.
You could add them to your graph or adjust the probability if they already exist and re-run PageRank.

Interactive elements of a web page

I was wondering if we have to consider interactive elements of a web page which are basically changing a section of a web page as a new level when making a site map. For example, I have a web page "x" with edit, new, delete function button. Clicking on these buttons changes only a specific part of the page which is associated which is a constant area in itself. The parts of the web pages which don't change are the top navigation, footer etc. While thinking of a site map I wasn't sure if clicking on features like edit would be considered a new level since the web page is the same.
No, interactive page elements would not be considered part of a site map.
The page they reside on would be placed on the site map, but that is it.
A site map is meant to record the hierarchy and individual pages of a site... the things a person can navigate to.
Interactive elements would not fit this unless there are several different bits on one page and those bits can be reached by anchors.

Update Drupal views argument via AJAX

I have a request concerning Drupal 6.x
I'd like to have this behaviour:
imagine to have 2 columns, on the left a list of nodes (only titles for example) and on the right a view showing just one of the contents on the left.
My idea would be to achieve this with an AJAX-fashion: clicking a link in the list on the left updates the view on the right with the actual node.
Which is the best way to handle this?
My idea is to use Panels, make 2 column panel with 2 views, one (left) filtered on content type, with no arguments, and one on the right which takes in as an argument the node id to be displayed.
But how to link the 2 views with AJAX?
(or, better, how to update the view on the right with an AJAX call?)
is this possible?
Any help or idea is really welcome
Thanks!
Cheers
Mauro
You also can do a quick hack, which is quite flexible, because it allows you to change your views without changing code.
I have had a similar task recently and for your task I would do the following:
for your right column, create a exposed filter (node id) and hide whole exposed filter form using CSS.
using jQuery, attach a click behavior to titles on your left column.
the click behavior takes the node id, finds the attached exposed filter at the right column, enters the node id into the input field and executes form's .submit().
the .submit() triggers the build-into-views well debugged ajax request which refreshes your right column.
this is certainly possible, and not very difficult to do.
Your task can be divided into two main parts:
Providing a 'callback' URL in the Backend that takes a node id (nid) and returns the markup to display the node in the right panel in a format that can be processed by javascript. This will be done in PHP within a normal Drupal module. The main point is not to return a full Drupal page as usual, but only the markup for the node.
Create logic for the Frontend that, when triggered by clicking a link in the left panel, retrieves the new node markup via the URL callback above and replaces the content of the right panel with it. This needs to be done in javascript, using the Drupal javascript API with jQuery.
You can find an introduction and example for AJAX in Drupal here. (This does almost exactly what you want to do, only with images)
You should also look at this more general entry point for JavaScript in Drupal.

How to set the order in subnodes of a tree structure

I have a tree representation of pages in a CMS application. I understand how to persist the tree in the database. However, I don't have a good way to:
A) Reorder subpages under a particular parent page.
B) Provide a UI implementation that allows the user to change the order.
Any suggestions?
Changing the order itself will require you store some sort of ordering along with each page in the database. Just the current highest / lowest value +/- 1 would probably be a fine starting point. Once you've got that ordering in there, reordering becomes a case of swapping two values or changing the value for one page to be between two others (you could use floats I guess, but you may need to renumber if you split it too many times).
Anyway, once you've got that, you need a UI. I've seen a very simple 'swap this with the one above/below' approach which can be a simple web link or an AJAX call. You could also present all the page values to the user and ask them to renumber them as they see fit. If you want to get fancy, JavaScript drag and drop might be a good approach. I've used ExtJS and Mootools as frameworks in this kind of area. If you don't need all the Extjs widgets, I'd say well away from it in future, and look at something like the Mootools Dynamic Sortables demo.
A) I have a similar CMS app and I store an ordinal value with the page for a particular tree and sort on this value -- because lots of my pages appear in completely different sites I have to maintain the ordinal number against a page / tree combination.
B) I too would like a better way to do this. Currently they click on the node in the treeview and in the main page screen they can move the page around. I've tried drag and drop with java script and other solutions but my users could never work with it without lots of hand holding. I'll be interested in the responses to this one.

Resources