Recent Topics

1 Jun 03, 2007 01:47    

My b2evolution Version: Not Entered

I'm testing first time this good cms.
I cannot find how to:
- create a new post on public side (I mean how to able a user to post directly from this side without to go on admin side, in the same easy way like to send a new feedback)
- show by default all the feedbacks on a post (without to click on feedback link)

Are these features available? How I can activate them? I think these are important to give to user more usability.

Many thanks.
Nicola.

2 Jun 03, 2007 10:53

Don't quote me with this but as far as I know, for number 1, you can't. The only way to write new posts is via the backoffice. I believe this is also the convention followed by many of the other blog software (e.g. WordPress). Despite of the fact, I belive you can write a plugin or something to enable this (though it may pose a security risk).

For your second question, what do you mean by showing feedbacks fo the post? In the main blog post list or in the administration panel? And do you mean something like "the last 5 feedbacks" in the post? Check other blog software, I think they also don't offer this though they have something like the listing the most recent replies althroughout the blog or feeds of the posts and their feedbacks.

3 Jun 03, 2007 12:15

Many thanks for your reply.
In the main blog post list you can see last posts and to show the feedback you have to click on "leave a comment".
In my case the comments could be more important than a post. For this I'd like that they are visible on the page at the first download, not necessary to click on "leave a comment" to see them.
I need the blog for a public committee where the contribution of many people could be more important of these of the owner of the site.

4 Jun 03, 2007 15:40

Search the forums for the second issue, as I am quite sure it has been covered a couple of different times. The risk to this is that let's say you have 5 posts per page and each post gets 10 or 20 comments. That will make your page very very long! Anyway it's been done and I'm sure it's covered somewhere in the forums. Sorry, but I don't have a link to it handy.

5 Jun 03, 2007 15:46

If that's the case, you can always hack through the skins. Check out _feedback.php located under [blogroot]/skins and check the region marked by: <!-- ========== START of a COMMENT/TB/PB ========== -->
and the code around it. Then copy that area somewhere near where your skin includes that file.

6 Jun 03, 2007 16:34

No that's not how it'll be done. An edit in skins/yourskin/_main.php is required. _feedback.php can be left as-is. Basically you tell _main.php to include feedback when normally it is not included by default.

7 Jun 03, 2007 17:26

The problem with just including _feedback.php (Which all skins do) is that it checks if $c $tb and $pb is present and turns the disp_comments flag off when $c is not present, which in, turn doesn't show the comments.
So it means that the _main.php file should handle the comment display which is normally handled by _feedback.php (which is why I recommended of checking _feedback.php for reference on how Comments are pulled out from the system... not necessarily on how to modify the file itself.) when it wants to force the comments to show.

Or is there probably a better way?

8 Jun 04, 2007 00:22

Yes. Search the forums and it'll show up. A couple of them. Basically set $c to 1 in _main.php but that's just the basically version.

9 Jun 04, 2007 01:02

Okay here's a basically version with some actual code. It works. I just tested it. It's got some cosmetic problems, but it's a basically so ... one must expect that it ain't all there ;)

In skins/yourskin/_main.php find the bit that calls for "$Item->feedback_link" (you might find a couple of lines in a row with that in it), and add a new bit in front of it to set $c to "1". Like this:

	<?php $c = 1; ?>
	<?php $Item->feedback_link( 'comments', ' &bull; ' ) // Link to comments ?>
	<?php $Item->feedback_link( 'trackbacks', ' &bull; ' ) // Link to trackbacks ?>
	<?php $Item->feedback_link( 'pingbacks', ' &bull; ' ) // Link to trackbacks ?>
	<?php $Item->edit_link( ' &bull; ', '', get_icon( 'edit' ) ) // Link to backoffice for editing ?>
	<?php $Item->trackback_rdf() // trackback autodiscovery information ?>

Next you probably want to stop the comment form from showing up on every post on your multi-post pages. To do that is slightly more complex than just adding a new line. Slightly below the part you just changed find this line:

$disp_comment_form = 1;  // Display the comments form if comments requested


Now change it to look like this:

if( $disp == 'single' ) {
	$disp_comment_form = 1;  // Display the comments form if comments requested ON SINGLE POST PAGES
	} else {
	$disp_comment_form = 0;  // Do NOT display the comments form on MULTI POST PAGES
	}

If you allow trackbacks and want them included in your multi-post pages you change the first hack to include $tb, like this:

<?php $c = $tb = 1; ?>


Also you might want to hide the trackback URL if you chose to hide the comment form when a visitor is on a multi page post. That's easy too, only now you're going to change the second bit in a slightly more complicated way. If you accept that the second part of the base hack above is actually removing one line and adding a 5-line "if" condition then all we do now is remove another line and add 2 more to the "if" condition. Remove this:

$disp_trackback_url = 1; // Display the trackbal URL if trackbacks requested


Now modify your "if" condition above to this:

if( $disp == 'single' ) {
	$disp_comment_form = 1;  // Display the comments form if comments requested ON SINGLE POST PAGES
	$disp_trackback_url = 1; // Display the trackbal URL if trackbacks requested ON SINGLE POST PAGES
	} else {
	$disp_comment_form = 0;  // Do NOT display the comments form on MULTI POST PAGES
	$disp_trackback_url = 0; // Do NOT display the trackbal URL on MULTI POST PAGES
	}


You can also do the same for pingbacks, but since pingbacks are going away it only matters if you have a blog old enough to actually have pingbacks in the database.


Form is loading...