Recent Topics

1 Jul 17, 2008 01:37    

My b2evolution Version: 2.4.2

Hi all!
Here is my site: http://szinkronanime.gate.hk

Here is a few thing i want to make, but i can't find a solution (i searched on the forum, but it is a little messy, sorry):

Easier functions:
--- SOLVED -----1. - i want that my post always changing randomly on the index site (because in this way all post can get enough hits) I'm not refreshing my site too many times, so it would be important.

--- SOLVED -----2. - how should i do, to change the listing order in the post list widget to alphabetical? It would be very important (or i'm looking for any solution, which will list all my articles/posts in alphabetical order)

-----SOLVED ------3. - I want a widget with the top X newest edited posts title

Harder functions:
1. - I want to change every url on my blog shorter, because long url-s "destroys" my skin.(in some blogs it works like this: www.google.hu/search=...ßfdjkdlsfe)
I also want to resize images automatically, (external images, in this way i can save bandwidth) which are bigger than a given size.

2. - I want to make a page, which will show my posts in alphabetical order but this time in this way:
left side: thumbnail of the first image(in my case it is external url!) in the post, after that the title of the post, linked to the article
Limited number of post listed, like 10 posts on the page, and some kind of find functions, like an a b c . If the user clicks on the a, it will just select the posts titles starting with an A.

Thanks for the replies, and sorry for my poor english!

2 Jul 17, 2008 03:05

Question 2+3:
a) crack open /inc/widgets/widgets/_coll_post_list.widget.php and change line 74 to:

'options' => array( 'DESC' => T_( 'Newest to oldest' ), 'ASC' => T_( 'Oldest to newest' ), 'EDITED' => T_( 'Most recent edited' ), 'ALPHA' => T_( 'Alphabetically' ), 'RAND' => T_( 'Random selection' ) ),


b) crack open /inc/widgets/model/_widget.class.php and add both elseif blocks around line 521 so it looks like:

		if( $what == 'pages' )
		{
			$ItemList->set_filters( array(
					'types' => '1000',					// Restrict to type 1000 (pages)
					'orderby' => 'title',
					'order' => ( $this->disp_params[ 'disp_order' ] ? $this->disp_params[ 'disp_order' ] : 'ASC' ),
					'unit' => 'posts',
				), false );
		}
		elseif( $this->disp_params[ 'disp_order' ] == 'ALPHA' )
		{ // Hack, the diisp+order ALPHA doesn't exist in the DB query, so the query sorts DESC instead
			$ItemList->set_filters( array(
					'order' => 'ASC',
					'orderby' => 'title',
					'unit' => 'posts',						// We want to advertise all items (not just a page or a day)
				) );			
		}
		elseif( $this->disp_params[ 'disp_order' ] == 'EDITED' )
		{
			$ItemList->set_filters( array(			
					'order' => 'DESC',
					'orderby' => 'datemodified',
					'unit' => 'posts',						// We want to advertise all items (not just a page or a day)			
				) );		
		}
		else
		{	// post list
			$ItemList->set_filters( array(
					'order' => ( $this->disp_params[ 'disp_order' ] ? $this->disp_params[ 'disp_order' ] : 'DESC' ),
					'unit' => 'posts',						// We want to advertise all items (not just a page or a day)
				) );
		}


You now have a fully functiona; option 'Alphabetical' in the settings of the widget.

Good luck

*edit*
Added answer 3 ;)

3 Jul 17, 2008 12:04

Thank you for the fast help, the alphabetical order was the most important.
All the solutions works like a charm, i think you should implement in the next updated version of b2 evolution (because alphabetical list is very important, i think.)

The other questions are still opened: the most important is the last (i think) easier to make function, the random select posts on the index page.

Anyway, thanks for this!

5 Jul 18, 2008 16:25

Ok, the most important functions are working now, and i see that image handling is not working in b2evolution yet, so maybe i should make the listing page in html, or php (in a static way)

Still - if there is someone who have an idea how to shorten the urls, and resize the images, i'm waiting for it.

In the other way, thanks for the fast support.


Form is loading...