Author Topic: Display a Blog menu  (Read 49818 times)

daydreamer

  • Guest
Re: Display a Blog menu
« Reply #75 on: November 21, 2009, 01:15:07 PM »
Does blog menu work with WB 2.8 Thanks

Offline stumed

  • Posts: 9
Re: Display a Blog menu
« Reply #76 on: November 23, 2009, 03:47:33 PM »
@daydreamer

Hi, I dont try in the 2.8 version. It work well for me in 2.7. after some changes in the code(adding block for viewing in one page, not all)
I think that it's work in 2.8 but I'm not sure. I will testing it in some next weeks.

Cheers!

Stumed

Offline sky writer

  • Posts: 926
Re: Display a Blog menu
« Reply #77 on: November 23, 2009, 04:07:38 PM »
I upgraded from 2.7-2.8 with the blog menu intact and no problems.
« Last Edit: November 23, 2009, 04:29:19 PM by sky writer »

daydreamer

  • Guest
Re: Display a Blog menu
« Reply #78 on: November 27, 2009, 10:51:11 AM »
In my posts it is showing [TEXT_POSTED_BY] [TEXT_ON] [PUBLISHED_DATE] like that why is this?

Offline Turskis

  • Posts: 50
Re: Display a Blog menu
« Reply #79 on: January 14, 2010, 02:20:15 PM »
Same here. With WB 2.8 and replaced view.php in news module

Offline gucci

  • Posts: 59
Re: Display a Blog menu
« Reply #80 on: January 21, 2010, 11:42:01 AM »
Hello all,

i want to use blog menu for my site, but I`ve seen that there are new versions of the view.php with some bugfix.


Replacing view.php in the news module directory means that you replace the bugfix.
Has someone made an adjustment?

Cheers gucci
« Last Edit: January 21, 2010, 09:20:34 PM by gucci »

mr-fan

  • Guest
Re: Display a Blog menu
« Reply #81 on: January 22, 2010, 12:10:28 AM »
jea,

take the droplet ->blog menu....without replacing the view.php

https://forum.WebsiteBaker.org/index.php/topic,16331.msg107151.html#msg107151

regards martin

Offline gucci

  • Posts: 59
Re: Display a Blog menu
« Reply #82 on: January 22, 2010, 09:57:46 AM »
cool,

thanks martin.

The droplet should be listet on AMASP.

Regards gucci

Offline sky writer

  • Posts: 926
Re: Display a Blog menu
« Reply #83 on: February 19, 2010, 10:38:56 PM »
Maybe this will help others.

I did a code compare between the "Blog Menu" news/view.php and the News V3.5 view.php (installed with WB 2.8.1).  There was just a short bit of code to add over to allow it to function...

find:
Code: [Select]
// Check if we should only list posts from a certain group
if(isset($_GET['g']) AND is_numeric($_GET['g']))
    {
$query_extra = " AND group_id = '".$_GET['g']."'";
} else {
$query_extra = '';
}

// Get settings

Change to:

Code: [Select]
// Check if we should only list posts from a certain group
if(isset($_GET['g']) AND is_numeric($_GET['g']))
    {
$query_extra = " AND group_id = '".$_GET['g']."'";
} elseif(isset($_GET['m']) AND is_numeric($_GET['m']) AND isset($_GET['y']) AND is_numeric($_GET['y']) AND isset($_GET['method']) AND is_numeric($_GET['method'])){
$startdate = mktime(0,0,0,$_GET['m'],1,$_GET['y']);
$enddate = mktime(0,0,0,$_GET['m']+1,1,$_GET['y']);
switch($_GET['method']){
case 0:
$date_option = "posted_when";
break;
case 1:
$date_option = "published_when";
break;
}
$query_extra = " AND ".$date_option." >= '$startdate' AND ".$date_option." < '$enddate'";
} else {
$query_extra = '';
}

// Get settings

Offline sky writer

  • Posts: 926
Re: Display a Blog menu
« Reply #84 on: February 20, 2010, 03:36:23 AM »
Guys,

The ?g=3?g=3 is not in the view.php but in the table settings in the backend of WB.
The breadcrumb links are being built from the original link. but when called from a "group link" it will include the group parameter too.

In the post header (settings button of newspage) the links are built using:
Code: [Select]
<td valign="top"><a href="[BACK]">[PAGE_TITLE]</a> >> <a href="[BACK]?g=[GROUP_ID]">[GROUP_TITLE]</a></td>
The [back] link will have the g= parameter (what is not right) and so the second level [back] will have two of them.

Change that line in:
Code: [Select]
<td valign="top"><a href="/pages/artikel.php">[PAGE_TITLE]</a> >> <a href="/pages/artikel.php?g=[GROUP_ID]">[GROUP_TITLE]</a></td>
And it is fixed.
Note: I used /pages/artikel.php in this example because that was in the "problem" page that spida reported. For other site, use whatever link is your news/blog page.

That will fix it.

Ruud


Ruud,

Thank you so much for this fix.  It works perfectly on the group link breadcrumbs.  Is there any way to make the "Back" link operate the same way when accessing post groupings of date specific links?  In other words, if someone clicks on June 2008 (2) and then clicks to view one of the two posts, then clicks the "Back" button, they are currently taken back to the root news posting page (with all posts listed).  Is there any way to take them back to the June 2008 News Posts page (with the two posts), that they came from?