Recent Topics

1 May 17, 2008 08:48    

My b2evolution Version: Not Entered

hi people, i have an idea and am trying to figure out how can i do it (without writing a plugin (: ).

It's not that i need it; i just thought it may be fun..

it's supposed to be kinda like starrating plugin, a progress bar ; growing horizontally ; it will have values just like starrating; like 0 to 5 or 0 to 100 etc...

the idea is, that progress bar will grow as the posts number of view count increases and which is called 'post popularity'.. : P

but the thing is it must have min-max values ofc, as that horz. prog. bar can grow forever..

Here is an example: wrote:

min view count: 0 views (for an empty bar)
max view count: 1000 and 1000+ views (for a full bar)

http://i29.tinypic.com/2a44nt.jpg

bottomline: This is similar to star rating plugin in a way, but it's somehow different in some ways:

Why i thought this would be cool is; people don't like rating nothing else than stupid youtube videos, and votes are sometimes nothing but unconscious random clicks, and yet i dont find trustable as static ip is not very common ; ) and 'only members can vote' and 'members vote are remembered' options are not available yet

There will not be need of many (hundreds or thousands) of votes (user clicks) for a decent classification where this is the most important as the post will gain an automatic ranking..

I dont know if this sounded stupid or unnecessary, i did not get much sleep, i ve just said it, ;) but i d like to hear opinions, cheers...

2 May 17, 2008 09:36

YOU will write this plugin!

Please clarify for me: you are talking about a progress bar that actually shows page views. This idea does not have a "vote for me" feature - instead it shows page views and considers that a measure of popularity.

IF this is so then I think it wouldn't be too hard, but it would probably be a hack more than a plugin. A "clean" hack though: like, not hacking core files. Just add stuff to conf/hacks.php then a bit to your skin to include the progress bar. Progress bars are neat. You can cheat them up really easy by using a background image for the bar itself then using a .png file of (for example) 12 pixels tall and 1 pixel wide, then making the image be width=146 height=12 for a bar showing 146 of whatever the maximum is.

A long time ago there were a couple of hacks that did something similar. They put 1 to 10 little boxes in a row to sort of show how many views a post had gotten. You had to tell the hack "1000 hits = 10 boxes" or whatever you liked. So what you might want to do is make it so that you could set a scale on it. For example some of my posts claim to have 150,000 page views which I don't believe but whatever: I would probably want to divide that down so that 150,000 views meant the maximum width of the bar, then scale all other hits accordingly. OR say that after X number of page views it gets a full bar with a little + symbol next to it?

But yeah this would be neat. I could probably use part of it to show download counts as a progress bar for all the zips that I let get downloaded.

I'm still stuck in translator land though :( The big ticket issues on the authors part are all fixed, but I am totally rethinking how to handle translations. Plus I found something in the core translation messages.po files that bugs my plugin to no end: msgid lines that start with "" and have the actual text on the next line :'(

3 May 17, 2008 10:18

EdB wrote:

Please clarify for me: you are talking about a progress bar that actually shows page views. This idea does not have a "vote for me" feature - instead it shows page views and considers that a measure of popularity.

yep, that's it, let's say, converting 100 pageviews to a 10 times repeated bar img.

the most important thing is; the ability to set the "x-long bar = y-times views" measure and a "top limit".

taking 'the most viewed post's view count as 'top limit' is another idea, however i dont find it useful as than it would be nothing but 'sort by view count and display as image'

but if you set a top limit, they will be 'grouped' rather than being 'ranked'

EdB wrote:

OR say that after X number of page views it gets a full bar with a little + symbol next to it

yep a full-filled bar means most popular, a + near it, if it's over the 'toplimit', or again a same full-filled bar but yet 'red' lets say, indicating the post is one of the burning 'hot' posts..

EdB wrote:

They put 1 to 10 little boxes in a row to sort of show how many views a post had gotten.

can i have a link to that ? i ll dig this thing some time, or try to modify the starrating plugin, dont know, but i am also dealing with 2 fully customized skins and compability issues, and also i dont feel i will be able to do it

btw, as i am thinking&writing, i still cant decide which method would be more useful, and as i continue thinking, i sometimes get the feeling 'that will be really unneccesary' but then i say 'it can be useful', though it will be fun for sure..will see (:, let's hear other opinions if ppl get the idea it isn't useful, or is it ? or it would be useful only if it was 'bla bla' .. dont know, will think about it

4 May 17, 2008 10:38

global $DB;
$max_views = $DB->get_var( 'SELECT post_views FROM T_items__item ORDER BY post_views DESC LIMIT 1' );
		if( isset($MainList) ) while( $Item = & $MainList->get_item() )
		{


.......


echo intval( $Item->get( 'views' ) / $max_views * 100 );
		?>

¥

5 May 17, 2008 10:49

I like the idea of a sliding bar instead of squares to show the relative popularity. If your server has awstats to look at your stats traffic do a "view image" on one of the bars it makes for how much whatever each month had. All they do is take an image and stretch it, so yeah it's pretty slick looking. And it can be really really REALLY granular.

Figure a post has 425 pixels wide to work with. This based on the image params for various skins. Anyway if you use 400 of those pixels for the bar (and the rest for decorating it a bit) you can get the same as if it was up to 400 boxes.

So like let's say you pick a top end of 4000 page views. So now you divide page views by 10 and cap the answer at 400. Suddenly you have the width attribute for the image that will be the bar.

-----------------------

The old hacks are somewhere in the belly of the forums. WAY back in the day. Can't even recall what we called them, but it goes back to the 0.9 days so yeah it's way back. I did one of them and played a lot in the forum threads about both so that's a clue for a diligent forum searcher. Probably in the plugins and hacks forum to further help reduce the responses?

--------------------------

tilqicom wrote:

... i sometimes get the feeling 'that will be really unneccesary' but then i say 'it can be useful', though it will be fun for sure ...

The only thing that should matter is if it will be fun to give it a shot. If not don't bother. After that ask yourself if you want it for your own. If you think it will be fun to try and you want it then make it happen! This whole blogging thing is "unnecessary" right? "Have FUN or don't even bother" is my idea.


Form is loading...

Secure CMS – This forum is powered by b2evolution CMS, a complete engine for your website.