Toggle Content

Donations

Donate with PayPal!
Help support Pro_News and become a member of our Sponsors Group
The tip jar is at PayPal, but does not require a PayPal account
Anonymous $ 10.00
macavity $ 115.00
RedGerry £ 50.00
Anonymous $ 10.00
minor $ 20.00

Recommended ISP

Pro_News version 3.2: Lots of Improvement

Forum dedicated to discussion of articles posted in Home page of Pro_News
Kirim balasanKirim balasan Versi Cetak
Pilih halaman Sebelumnya  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Selanjutnya

Re: Pro_News version 3.2: Lots of Improvement

Kirim Dikirim: Mon Jul 20, 2009 9:19 am

I've just noticed this and downloaded. Found couple of bugs in the upgrade.

This line in the 3.2.0.0 upgrade:

Code:
$installer->add_query('UPDATE', 'pronews_sections', 'post = "2" WHERE id = 1"');


should be.

Code:
$installer->add_query('UPDATE', 'pronews_sections', 'post = "2" WHERE id = "1"');



And you're missing a closing curly bracket at the end of that section to close the upgrade function off.

I'll report any more bugs as I spot them, the test cricket may get in the way though...



fishingfan's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux,Apache2.2,mysql5,php5,dragonfly 9.2

fishingfan
Developer
Developer
 
Post: 78
Sejak: Oct 08, 2008

Re: Pro_News version 3.2: Lots of Improvement

Kirim Dikirim: Mon Jul 20, 2009 1:56 pm

I see some oddity with the new Post By field in the section forms. Works ok but it resets when you look at it again.

I've fixed it after a quick look at the code.

Need to add $post to the select from database line on line 1711, so it knows the value stored.

Lastly when submitting an article in Admin mode (whether logged in as user or not) the article username is posted as the number 1. Not as the username.

I think something is up with this line, as hacking out the admin if's (as shown below) means the post addes as user. Not sure if this would be secure though. Admin_functions.php line 1080.

Code:
				$postby = (can_admin($module_name) ? can_admin($module_name) : $userinfo['username']);


I added this hack to get round it...

Code:
                $postby = $userinfo['username'];

 



Oh and what a result in the 2nd test! Very Happy



fishingfan's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux,Apache2.2,mysql5,php5,dragonfly 9.2

fishingfan
Developer
Developer
 
Post: 78
Sejak: Oct 08, 2008

Re: Pro_News version 3.2: Lots of Improvement

Kirim Dikirim: Mon Jul 20, 2009 3:16 pm

Thanks.

For benefit of others reading this, the first fix, add , $post to the end of the array list( ) just be fore the closing ).

The correct line to fix the second issue is:

PHP:
				$postby = (can_admin($module_name) ? is_admin($module_name) : $userinfo['username']);



(I did global replace on is_admin to can_admin and changed 1 too many: is_admin returns required username, can_admin returns true/false!)



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006

Re: Pro_News version 3.2: Lots of Improvement

Kirim Dikirim: Fri Jul 24, 2009 3:38 pm

Thanks for the fix.

I've 3 extra points I've since noticed.

1) I think there maybe more items in the sections admin field that aren't being saved to the form, like the post variable. Eg Template, Show in Home.
I've not looked at the code yet.

2) Perhaps the oddest problem. I've been testing about and have hit a strange problem. I've set the language on the site to English. Now submitting new articles in pro-news, sees them show up as Lang = All on the admin screen. I can't find a way to set them to English there. I'm not too bothered about it to be honest, BUT....

On the home page this line in the functions.php script

Line 1455 roughly produces this SQL statement to display the articles.

Code:
 SELECT a.id aid,a.* FROM cms_pronews_articles as a WHERE a.catid=3 AND a.approved="1" AND a.active="1" AND display<>"0" AND (alanguage='english' OR alanguage='') ORDER BY display_order DESC, posttime DESC LIMIT 13



The database shows the languages of articles with lang = all to be null. So I am at a loss as to why this only gets my 'english' articles to display in home.

3) Lastly, It would be nice when showing in home to have a pagination option so say you have 10 showing up, and the next 10 would be on page to etc.



fishingfan's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux,Apache2.2,mysql5,php5,dragonfly 9.2

fishingfan
Developer
Developer
 
Post: 78
Sejak: Oct 08, 2008

Re: Pro_News version 3.2: Lots of Improvement

Kirim Dikirim: Sat Jul 25, 2009 12:18 pm

Item 1 I'm unable to reproduce. Can you give me more details as to the circumstances please? I've tried add and edit on 3 Sections without problem.

Item 2 As soon as you enable Multi-Language support, then Language option, defaulting to ALL, should appear in both Admin and user-side Submit Article.

However, your reported problem is not due to language handling, but due to a bug in the new Display in Home article setting. If you look you''ll see that Admin > Submit Article is defaulting Display to 'Not in Home' Sad

In admin_functions.php around line 1980 find:

PHP:
				$edit = array('id'=>'', 'title'=>'', 'allow_comment'=>'', 'catid'=>$cat,'topic'=>'', 'content'=>'', 'image'=>'', 'intro'=>'', 'caption'=>'', 'display_order'=>'', 'alanguage'=>'', 'album_id'=>'', 'album_cnt'=>'', 'album_seq'=>'', 'slide_show'=>'', 'gallery'=>'', 'image2'=>'', 'caption2'=>'', 'user_fld_0'=>'', 'user_fld_1'=>'', 'user_fld_2' => '', 'user_fld_3'=>'', 'user_fld_4'=>'', 'user_fld_5'=>'', 'user_fld_6' => '', 'user_fld_7' => '', 'user_fld_8' => '', 'user_fld_9' => '', 'usrfld0'=>'', 'usrfld1'=>'', 'usrfld2'=>'', 'usrfld3'=>'', 'usrfld4'=>'', 'usrfld5'=>'', 'usrfld6'=>'', 'usrfld7'=>'', 'usrfld8'=>'', 'usrfld9'=>'', 'clsdttime'=>'', 'cledttime'=>'', 'sdttime'=>'', 'edttime'=>'', 'cal_id'=>'', 'associated'=>'', 'display'=>'0');

and change the last parameter display from 0 to 1:

PHP:
				$edit = array('id'=>'', 'title'=>'', 'allow_comment'=>'', 'catid'=>$cat,'topic'=>'', 'content'=>'', 'image'=>'', 'intro'=>'', 'caption'=>'', 'display_order'=>'', 'alanguage'=>'', 'album_id'=>'', 'album_cnt'=>'', 'album_seq'=>'', 'slide_show'=>'', 'gallery'=>'', 'image2'=>'', 'caption2'=>'', 'user_fld_0'=>'', 'user_fld_1'=>'', 'user_fld_2' => '', 'user_fld_3'=>'', 'user_fld_4'=>'', 'user_fld_5'=>'', 'user_fld_6' => '', 'user_fld_7' => '', 'user_fld_8' => '', 'user_fld_9' => '', 'usrfld0'=>'', 'usrfld1'=>'', 'usrfld2'=>'', 'usrfld3'=>'', 'usrfld4'=>'', 'usrfld5'=>'', 'usrfld6'=>'', 'usrfld7'=>'', 'usrfld8'=>'', 'usrfld9'=>'', 'clsdttime'=>'', 'cledttime'=>'', 'sdttime'=>'', 'edttime'=>'', 'cal_id'=>'', 'associated'=>'', 'display'=>'1');



But, while replicating this I noticed that the articles created with Display = No were being displayed in Home if Display Headlines was set to No. So in functions.php around line 1120 find:

PHP:
		$sql = 'approved="1" AND active="1" AND display<>"2"';
// $sql .= ($is_home ? ' AND s.in_home="1"' : '');
$sql .= ($is_home ? ((in_array(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain) ? ' AND (s.in_home="1" OR s.in_home="'.array_search(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain).'")' : ' AND s.in_home="1"')) : '');

and replace with:

PHP:
		$sql = 'approved="1" AND active="1"';
// $sql .= ($is_home ? ' AND s.in_home="1"' : '');
$sql .= ($is_home ? ' AND display<>"0"'.((in_array(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain) ? ' AND (s.in_home="1" OR s.in_home="'.array_search(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain).'")' : ' AND s.in_home="1"')) : ' AND display<>"2"');



and around line 1160 find:

PHP:
		$sql .= ' AND a.approved="1" AND a.active="1" AND display<>"2"';
$sql .= ($multilingual ? " AND (alanguage='$currentlang' OR alanguage='')" : '');
// $sql .= ($is_home ? ' AND s.in_home="1"' : '');
$sql .= ($is_home ? ((in_array(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain) ? ' AND (s.in_home="1" OR s.in_home="'.array_search(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain).'")' : ' AND s.in_home="1"')) : '');

and replace with:

PHP:
		$sql .= ' AND a.approved="1" AND a.active="1"';
$sql .= ($multilingual ? " AND (alanguage='$currentlang' OR alanguage='')" : '');
// $sql .= ($is_home ? ' AND s.in_home="1"' : '');
$sql .= ($is_home ? ' AND display<>"0"'.((in_array(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain) ? ' AND (s.in_home="1" OR s.in_home="'.array_search(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain).'")' : ' AND s.in_home="1"')) : ' AND display<>"2"');



Thanks for finding this!

Item 3 I presume that you mean when in Headline mode? (Because in non-Headline mode it already paginates.) I agree it would be nice. I guess it would have to be a new Config parameter: 'Number of Sections per Page.' But honestly I'd thought that if you were using headlines then you'd limit the number of Sections in Home to suit.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006

Re: Pro_News version 3.2: Lots of Improvement

Kirim Dikirim: Mon Jul 27, 2009 6:45 am

Hi there,

Long time no see you... I am so sorry, I have just get back from my activities in my office for the last one-two months.

Layingback, sorry for your request about Javascript/ECMAscript. Honestly, I am not too expert on that. I hope somebody else will help you to implement it.

Okay, I have tested the beta version, and I also followed and implemented all the changes from both of you; layingback and fishingfan regarding some bugs found by fishingfan.

What a wonderful job you did, layingback. Thanks for that. The most feature that I like is about the related articles modification made by layingback. I love too much for the related article selection by using combobox. Great and smart job. Really! Cool

Generally, so far so good, I think.

The only suggestion from me is about "Subject for email" and "Message body for email" directive in Config menu. I saw that the both setting were stored in the language files. IMHO, it is better if you save or store their both value in config_custom table, because currently, when we edit their value from Config menu, their values will not change!

But, if you think it is better if you still keep their values in the language files, please make it as label (read-only) instead of using textbox on the form. Just my two cents.

Now, I am adjusting and preparing the side-by-side news template by comparing the display_hdlines function in mine with yours. I will let you know the result and post the result as soon as possible.

All the best,
Masino Sinaga



masino_sinaga's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 2.2.11 (Unix) / 5.0.77-community- log / 5.2.9 / 9.2.1

masino_sinaga
Developer
Developer
 
Post: 40
Sejak: Jun 16, 2009
Lokasi: Jakarta, Indonesia

Re: Pro_News version 3.2: Lots of Improvement

Kirim Dikirim: Mon Jul 27, 2009 7:23 am

masino, You've misunderstood I think. I have placed the email parameters in config_custom, just like you did. The difference is that I pre-load them from the language file.

The problem with delivering in config_custom only is that a Translator can't deliver a complete package in a single language file. The disadvantage of only using a language file is that the majority of admins, running 1 language only, have to learn about the language file. So I load from language file if no entry currently in config_custom. Best of both worlds?

I do see 2 more enhancements that I need to make in this area though: I need to change your email entries to load the same way, plus I need to add code to functions.php so that multi-language sites can disable the config_custom version (somehow) or the emails are always going to be in the primary language ...

I've given up on the JavaScript/CSS for now. I can see how to do it, but it will not work within tables, so I first have to rework Submit Article to be xHTML - another time I think, not this release!

Glad you liked the Related Article change. I may be slow at coding, but I like to think that I do know ui. Wink

Looking forward to the side-by-side columns - hope it doesn't change the code too much. Because it's needed in non-headline mode as well I believe. Plus the center-block versions if possible.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006

Re: Pro_News version 3.2: Lots of Improvement

Kirim Dikirim: Mon Jul 27, 2009 9:13 am

Thanks for your confirmation, layingback.

By the way, I attached the index2col.html file. Download and extract this file, and copy-paste to your \themes\default\template\pronews\article directory.

Then, edit the code in functions.php file:

FIND this, around lines 1448:

PHP:
$sql .= ' LIMIT '.($sec_arts_per_hdline + 1);
$result = $db->sql_query($sql);
$list = $db->sql_fetchrowset($result);



AFTER THAT, ADD THIS:

PHP:
$artcount = $db->sql_numrows($result);




FIND this around lines 1453:

PHP:
if (isset($list) && $list != '' && count($list) > '0') {
foreach (
$list as $row) {



REPLACE WITH:

PHP:
if (isset($list) && $list != '' && count($list) > '0') {
$z = 0;
foreach (
$list as $row) {




FIND this around lines 1554:

PHP:
  'U_ALLLINK' => getlink("&mode=home"),
'L_HDLINES' => _PNLHDLINES,
'S_HDLINES' => _PNALL
));



REPLACE WITH:

PHP:
  'U_ALLLINK' => getlink("&mode=home"),
'L_HDLINES' => _PNLHDLINES,
'S_HDLINES' => _PNALL,
'S_ARTCOUNT' => $artcount,
'S_I' => $z,
'S_ARTMAX' => $sec_arts_per_hdline
));




FIND this around lines 1652:

PHP:
      'G_ICONS' => ($pnsettings['show_icons'] == '1') ? '1' : '',
'L_ID' => _PNREFNO,
'S_ID' => $row['aid']
));
$i++;
}
}
}
} else {



REPLACE WITH:

PHP:
      'G_ICONS' => ($pnsettings['show_icons'] == '1') ? '1' : '',
'L_ID' => _PNREFNO,
'S_ID' => $row['aid'],
'S_ARTCOUNT' => $artcount,
'S_I' => $z,
'S_ARTMAX' => $sec_arts_per_hdline
));
$i++;
}
}
$z++;
}
} else {



Before I edit the center block, please confirm first, whether you successfully implement this template in yours.

Sincerely,
Masino Sinaga



masino_sinaga's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 2.2.11 (Unix) / 5.0.77-community- log / 5.2.9 / 9.2.1

masino_sinaga
Developer
Developer
 
Post: 40
Sejak: Jun 16, 2009
Lokasi: Jakarta, Indonesia

Re: Pro_News version 3.2: Lots of Improvement

Kirim Dikirim: Mon Jul 27, 2009 10:46 am

masino,

Thanks for the above, hopefully I can get to look at it this afternoon. Just 1 question: which template did you base this new 2col template on?

To conclude the email discussion: I have modified the code to not populate the config fields if DF site is set to Multilingual (Admin > Languages > Config), so the config_custom fields will stay blank. If when emailing I find the config_custom fields are blank, I'll use the translation file text instead. I've also added a warning to Pro_News > Config if I see multilingual is set, to remind user to leave fields below blank and edit translations files instead.

This way users can configure it either way - 1 lang and Config, or > 1 lang and translation files.

I moved the affected fields to near top of pro_news.php language file.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006

Re: Pro_News version 3.2: Lots of Improvement

Kirim Dikirim: Mon Jul 27, 2009 11:15 am

- layingback

masino,

Thanks for the above, hopefully I can get to look at it this afternoon. Just 1 question: which template did you base this new 2col template on?



You're welcome, layingback.
About the template, I made it based on this topic in DF Forum site:
dragonflycms.org/Forum...ic/t=6318/

Actually, I have mixed it from all other places... including some of yours and the link above, especially index2alb or indexalb; just to comply my need. Wink

Here is the logic that I made within the template (just for headline in home):

1. The first article always justify (left-righ alignment), thus if the number of article is only one, then it always looked justify for itself.

2. If the number of article is odd and more than one (i.e: 3, 5, 7, and so forth), then the rest of articles always side-by-side.
For example:

Code:
<--- Story1 --->
Story2    Story3
Story4    Story5
Story6    Story7



3. If the number of article is even (i.e: 2, 4, 6, 8, and so forth), then the first and the last article always looked justify, and the rest of them is always side-by-side.
For example:

Code:
<--- Story1 --->
Story2    Story3
Story4    Story5
Story6    Story7
<--- Story8 --->



By the way, thanks for the modification you made into the email alert for notify admin about the pending article. Can't wait to use the last stable version. Wink

Keep up the good work! Cool

Sincerely,
Masino Sinaga



masino_sinaga's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 2.2.11 (Unix) / 5.0.77-community- log / 5.2.9 / 9.2.1

masino_sinaga
Developer
Developer
 
Post: 40
Sejak: Jun 16, 2009
Lokasi: Jakarta, Indonesia

Re: Pro_News version 3.2: Lots of Improvement

Kirim Dikirim: Mon Jul 27, 2009 11:28 am

Thanks for the background info. But what I was trying to ask is which Pro_News template is it most like: index2alb, or index2gly, or index2.html? Just so I can figure out how to position it in the release notes.

Thanks.

I've also just got info from Phoenix on how to use Include in templates, so I'll also be adding the social network html into the main release, rather than having users cut-n-paste. I've also come up with an (optional) better display.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006

Re: Pro_News version 3.2: Lots of Improvement

Kirim Dikirim: Mon Jul 27, 2009 11:46 am

Thanks for the info. This makes me can't wait to see your main-stable latest release, more and more... Laughing

See? What we have done so far? I am sure that your Pro_News module will be one of the News famous module in DF, especially for the news module for the next release of DF 10, since yours have so many powerful features until now, and it has the good potential feature for the future. Believe me!

Good job, and keep it up! Cool

Sincerely,
Masino Sinaga


_________________

http://www.visualbasicindonesia.com



masino_sinaga's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 2.2.11 (Unix) / 5.0.77-community- log / 5.2.9 / 9.2.1

masino_sinaga
Developer
Developer
 
Post: 40
Sejak: Jun 16, 2009
Lokasi: Jakarta, Indonesia

Re: Pro_News version 3.2: Lots of Improvement

Kirim Dikirim: Mon Jul 27, 2009 1:20 pm

- layingback

Item 1 I'm unable to reproduce. Can you give me more details as to the circumstances please? I've tried add and edit on 3 Sections without problem.

Item 2 As soon as you enable Multi-Language support, then Language option, defaulting to ALL, should appear in both Admin and user-side Submit Article.

However, your reported problem is not due to language handling, but due to a bug in the new Display in Home article setting. If you look you''ll see that Admin > Submit Article is defaulting Display to 'Not in Home' Sad

In admin_functions.php around line 1980 find:

PHP:
				$edit = array('id'=>'', 'title'=>'', 'allow_comment'=>'', 'catid'=>$cat,'topic'=>'', 'content'=>'', 'image'=>'', 'intro'=>'', 'caption'=>'', 'display_order'=>'', 'alanguage'=>'', 'album_id'=>'', 'album_cnt'=>'', 'album_seq'=>'', 'slide_show'=>'', 'gallery'=>'', 'image2'=>'', 'caption2'=>'', 'user_fld_0'=>'', 'user_fld_1'=>'', 'user_fld_2' => '', 'user_fld_3'=>'', 'user_fld_4'=>'', 'user_fld_5'=>'', 'user_fld_6' => '', 'user_fld_7' => '', 'user_fld_8' => '', 'user_fld_9' => '', 'usrfld0'=>'', 'usrfld1'=>'', 'usrfld2'=>'', 'usrfld3'=>'', 'usrfld4'=>'', 'usrfld5'=>'', 'usrfld6'=>'', 'usrfld7'=>'', 'usrfld8'=>'', 'usrfld9'=>'', 'clsdttime'=>'', 'cledttime'=>'', 'sdttime'=>'', 'edttime'=>'', 'cal_id'=>'', 'associated'=>'', 'display'=>'0');

and change the last parameter display from 0 to 1:

PHP:
				$edit = array('id'=>'', 'title'=>'', 'allow_comment'=>'', 'catid'=>$cat,'topic'=>'', 'content'=>'', 'image'=>'', 'intro'=>'', 'caption'=>'', 'display_order'=>'', 'alanguage'=>'', 'album_id'=>'', 'album_cnt'=>'', 'album_seq'=>'', 'slide_show'=>'', 'gallery'=>'', 'image2'=>'', 'caption2'=>'', 'user_fld_0'=>'', 'user_fld_1'=>'', 'user_fld_2' => '', 'user_fld_3'=>'', 'user_fld_4'=>'', 'user_fld_5'=>'', 'user_fld_6' => '', 'user_fld_7' => '', 'user_fld_8' => '', 'user_fld_9' => '', 'usrfld0'=>'', 'usrfld1'=>'', 'usrfld2'=>'', 'usrfld3'=>'', 'usrfld4'=>'', 'usrfld5'=>'', 'usrfld6'=>'', 'usrfld7'=>'', 'usrfld8'=>'', 'usrfld9'=>'', 'clsdttime'=>'', 'cledttime'=>'', 'sdttime'=>'', 'edttime'=>'', 'cal_id'=>'', 'associated'=>'', 'display'=>'1');



But, while replicating this I noticed that the articles created with Display = No were being displayed in Home if Display Headlines was set to No. So in functions.php around line 1120 find:

PHP:
		$sql = 'approved="1" AND active="1" AND display<>"2"';
// $sql .= ($is_home ? ' AND s.in_home="1"' : '');
$sql .= ($is_home ? ((in_array(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain) ? ' AND (s.in_home="1" OR s.in_home="'.array_search(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain).'")' : ' AND s.in_home="1"')) : '');

and replace with:

PHP:
		$sql = 'approved="1" AND active="1"';
// $sql .= ($is_home ? ' AND s.in_home="1"' : '');
$sql .= ($is_home ? ' AND display<>"0"'.((in_array(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain) ? ' AND (s.in_home="1" OR s.in_home="'.array_search(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain).'")' : ' AND s.in_home="1"')) : ' AND display<>"2"');



and around line 1160 find:

PHP:
		$sql .= ' AND a.approved="1" AND a.active="1" AND display<>"2"';
$sql .= ($multilingual ? " AND (alanguage='$currentlang' OR alanguage='')" : '');
// $sql .= ($is_home ? ' AND s.in_home="1"' : '');
$sql .= ($is_home ? ((in_array(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain) ? ' AND (s.in_home="1" OR s.in_home="'.array_search(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain).'")' : ' AND s.in_home="1"')) : '');

and replace with:

PHP:
		$sql .= ' AND a.approved="1" AND a.active="1"';
$sql .= ($multilingual ? " AND (alanguage='$currentlang' OR alanguage='')" : '');
// $sql .= ($is_home ? ' AND s.in_home="1"' : '');
$sql .= ($is_home ? ' AND display<>"0"'.((in_array(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain) ? ' AND (s.in_home="1" OR s.in_home="'.array_search(ereg_replace('www.', '', $_SERVER['SERVER_NAME']), $domain).'")' : ' AND s.in_home="1"')) : ' AND display<>"2"');



Thanks for finding this!

Item 3 I presume that you mean when in Headline mode? (Because in non-Headline mode it already paginates.) I agree it would be nice. I guess it would have to be a new Config parameter: 'Number of Sections per Page.' But honestly I'd thought that if you were using headlines then you'd limit the number of Sections in Home to suit.



Thanks for the fix, I'll try it out soon.

Item1 - I can't remember exact circumstances, I will double check and if still see it note down how and why.

Item3 - Yes in headline mode. I was thinking that if I had say 10 headlines on the front page, then the old articles could be seen by paging on. Another solution/addition may be a "older articles" type block.



fishingfan's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux,Apache2.2,mysql5,php5,dragonfly 9.2

fishingfan
Developer
Developer
 
Post: 78
Sejak: Oct 08, 2008

Re: Pro_News version 3.2: Lots of Improvement

Kirim Dikirim: Mon Jul 27, 2009 1:29 pm

fishingfan,

On Item 3 I think we have a semantics problem Wink Let's just consider the Home page. If Config "Enable Headlines In Home" is set to No, then number of individual article panels to display (1 per article) is unknown, and so pagination should kick if more than 10 articles are to be displayed.

But if Config "Enable Headlines In Home" is set to Yes, then the number of individual panels is known, it is 1 per Section. Therefore I assumed that you would not select more than 10 Sections to display in Home, so there would be no need for pagination.

So are we talking about the same thing, and do you need more than 10 Sections on the Home page?



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006

Re: Pro_News version 3.2: Lots of Improvement

Kirim Dikirim: Tue Jul 28, 2009 10:05 am

@ Masino, I'm sorry but I can't get the 2 column code to work cleanly with the standard templates in the general case. (It does work with your template.) It can work sort of, with tables, but using divs it fails because of the clear commands already in the template. Plus it can only work as is with Hdlines - ie. it is not the general case. (Clever code though! Wink )

But to keep us all on 1 version of code, I will add the extra parameters to Hdlines template - both main and center block. But in the interest of keeping the total number of such "extra" parameters down I suggest just 2: S_ARTCOUNT and S_ARTINDEX. To remove the need for both your count and your max_count, I propose setting art_count to actual number being displayed - ie. the minimum of number found and max number to display setting. Think this should work.

The templates I can develop later/any time, in meantime I will leave the user to download and modify your template if they want 2 columns.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006
Link  QR  Share this Versi Cetak  facebook   myspace   twitthis  
Show more ...
Tampilan pesan sebelumnya:   
Kirim balasanKirim balasan Halaman 4 dari 10 Pilih halaman Sebelumnya  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Selanjutnya

Pro_News Articles in Home

Navigasi:  



Anda tidak dapat mengirim topik
Anda tidak dapat menjawab topik
Anda tidak dapat mengubah pesan Anda
Anda tidak dapat menghapus pesan Anda
Anda tidak dapat mengikuti polling
You cannot attach files in this forum
You cannot download files in this forum

Zona waktu menurut GMT






layingback Non-Human Terms of Use