Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all,
Vanilla are planning an update to the site on April 24th (next Wednesday). It is a major PHP8 update which is expected to boost performance across the site. The site will be down from 7pm and it is expected to take about an hour to complete. We appreciate your patience during the update.
Thanks all.

How can I create dynamic navigation bars?

Options
  • 25-05-2015 11:56pm
    #1
    Registered Users Posts: 1,977 ✭✭✭


    It would need to load "most popular" stories etc. on the site into a navigation bar at the top. The most popular stories could change throughout the day....

    I've been searching around with google....


Comments

  • Registered Users Posts: 11,977 ✭✭✭✭Giblet


    I would start with determining how a story is popular. Once you have that the rest will fall into place. Do you log stats on the stories or have any info about which ones are accessed. (Google Analytics, logging, access log/webserver logs etc)


  • Registered Users Posts: 1,977 ✭✭✭euser1984


    Thanks for your reply Giblet....

    It seems to be using the statistics module on Drupal 7....I don't know how to use it though....I'll begin working on it with google I suppose....

    I've seen it used on another site in this way
    I've just found out that the below code is for google analytics...

    [HTML]<a href="http://www.***.com/categoryname&quot; class="analytics" data-category="Nav clicks" data-label="Trending Tags" data-value="Category name">Category name</a>[/HTML]

    I do have the amount of reads under each article......but; when I run a report to get stats it says I have none. I'll have a look at that reads element under inspector now actually to see if I can figure anything out.

    Update: the inspector for the element (on my site) is defined this way in the html...

    class="statistics_counter first last"


  • Registered Users Posts: 4,946 ✭✭✭red_ice


    euser1984 wrote: »
    I do have the amount of reads under each article......but; when I run a report to get stats it says I have none. I'll have a look at that reads element under inspector now actually to see if I can figure anything out.

    I don't work with Drupal, however, if you have a list of 'reads' there must be a value stored in your database somewhere. Search for the post name / ID in the database, find the table that corresponds with the amount of 'reads'. This would more than likely be your most popular articles.

    I assume you could then query the top (n) articles and order by ascending to spit out your article title/url/id from the values used in your query.


Advertisement