Recent Topics

1 May 07, 2008 23:55    

My b2evolution Version: Not Entered

Uhmm.. where should i start, this has made me confused..

before reading this post please take a look at [url=http://www.prosoftwarez.com/main.php/]here[/url]

Firstly, as you see, i have a aggregated Blog#1, including posts from 15 blogs that i use as categories.. I ve wanted it to display those content in 3 columns and 15 divs, aggregating these posts.. and as i dont want the normally displayed aggregated blog list i have created another blog2_main.inc.php and another posts.main2.php for only this index page to list them how i want..

This part is ok, my main page indexes aggregated posts and shows like i want in 3 columns style..

However as i have deleted the default lines showing posts&contents; when you do a search, it is actually searching but not showing results as default displaying is disabled..

What i would like is, to keep the current view as is, but show results when a search is made or when the category list is filtered ..
Any help would be greatly appreciated .. thanks in advance.. cheers

2 May 08, 2008 23:03

sorry for bumping the topic,
but let me put this more understandable and easy way;

you know a 'section head' for the current request appears when you search something before the posts are listed..

Let me mention the code which allows this:

	<?php
		// ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
		request_title( array(
				'title_before'=> '<h2 class="sectionhead">',
				'title_after' => '</h2>',
				'title_none'  => '',
				'glue'        => ' - ',
				'title_single_disp' => true,
				'format'      => 'htmlbody',
			) );
		// ------------------------------ END OF REQUEST TITLE -----------------------------
	?>

And this section shows 'only when you click a category, or when you perform a search' as you know..

Now; as i dont want to lists posts by default, and i want only posts to be listed when a search is performed in the main page (i have mentioned in the above post), the idea is the same basicly..
[u]
Bottomline is :
[/u]
That title is not shown 'until a search is performed or category is clicked'

How can i make my posts
not be shown

'until a search is performed or category is clicked'[/i

i believe it has to do sth with an array but dont know how to use it

3 May 10, 2008 14:08

Couple of things to think about here. First is "know your disp to control your disp". Groovy yah? So dig it: $disp is the big shot on what gets displayed, so in the file that actually makes your blog page put the following wee bit of code to learn all the different values of $disp:

<?php 
if( is_logged_in() ) {
echo '<p>disp is [['.$disp.']]</p>';
} ?>

Then you can do stuff with it using IF statements or switches if you're into switches. To get an initial page to display no posts even though you have posts might be something like this in the appropriate file:

<?php 
if( $disp == '' ) {
// in here you put what you want on the first page they see
} else {
// in here goes the normal posts loop
// ...
// be careful to get the entire posts loop
} // close out the if/else thing ?>

I've done lots of groovy stuff with that type of "cheat" though it might not be ( $disp == '' ) that you need for your conditional. It can easily get messy though so have backups handy.

4 May 10, 2008 18:51

Hi ed, thank you very much for your answer, this is the only but the biggest issue i have before i get started..
Because, as i have deleted the whole display functions in the posts.main.php, when a search is done, it was searching but not showing the results as all displaying was deleted, as you know search is an integral part of a software site.

I have been dealing with this about a week, i have read [url=http://forums.b2evolution.net/viewtopic.php?p=67251#67251]John's topic[/url] it is similar to what you have said i guess, but your response got me one step closer.

Earlier, I have defined another blog2.main.php and posts3.main.php, and changed the display handler for posts to posts3.main.php for main page in order to still use the same skin but somehow display different(dont know if this is actually necessary)

I guess i will have to open index.main.php and insert those here ?:

	<?php
		// -------------- MAIN CONTENT TEMPLATE INCLUDED HERE (Based on $disp) --------------
		skin_include( '$disp$', array(
			) );
		// Note: you can customize any of the sub templates included here by
		// copying the matching php file into your skin directory.
		// ------------------------- END OF MAIN CONTENT TEMPLATE ---------------------------
	?>

I am not sure where should i put these and how 'exactly' should i use.. I'll try to figure out though..Any further help would be appreciated ..


Form is loading...