-
AuthorPosts
-
January 21, 2010 at 1:00 am #147841
Hi!
How do I make JA News Frontpage module and copied JA News Frontpage Headline module to the same page independent from each other? All articles assigned to Frontpage show in both modules. How do I assign separate articles to each?
1. I copied the JA News Frontpage module and placed it “0” order before the existing JA News Frontpage module.
2. I went into Advanced Parameters and changed the copied JA News Frontpage layout to HEADLINE layout so that I had random images showing.
3. I assigned an Article/Image XX to HEADLINE layout. This is all good and works, but
4. this Article/Image XX also shows in the JA News Frontpage layout just below on page.
5. I don’t want the Article/Image XX article, which appears in JA New HEADLINE to also appear in the JA News Frontpage layout. I want to assign different articles to both modules.How do I make each copied module independent from each other, so that I can assign separate titles and articles to each module? All JA News Frontpage and JA News Headline modules feature the same titles and articles. I have tried to change linking in the module, section, category, and article managers, but with no success. Please help…
Thank you for your help,
DebSaguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
January 23, 2010 at 5:04 am #330105Hello guy!
You must to customize this module to complete for idea.
I give you the solution in the last postThanks
January 24, 2010 at 9:44 pm #330241Hi Tienhc,
Thank you for your reply. Can you provide me with a custom code for the JA News Headline module that will add an option to assign content from a separate category? Independent from the JA News Frontpage module.
Thank you,
DebSaguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
February 5, 2010 at 3:04 am #331608Dear guy!
Sorry for my delay.
Here is the solution for you:
1) Please open the file: modulesmod_janews_fpmod_janews_fp.xml and find a tag at line 31
<param name=”hiddenClasses” type=”textarea” default=”” rows=”10″ cols=”30″ label=”HIDDEN CLASSES” description=”HIDDEN CLASSES DESC” />
replace:
[PHP]<param name=”hiddenClasses” type=”textarea” default=”” rows=”10″ cols=”30″ label=”HIDDEN CLASSES” description=”HIDDEN CLASSES DESC” />
<param name=”category” type=”category” default=”” label=”CATEGORY SELECTION” description=”CATEGORY SELECTION DESC” />
[/PHP]2) open the file: modulesmod_janews_fpmod_janews_fp.php and try to find code at line 46:
[PHP] $rows = modJANewsHelperFP::getHLNews ( $numberofheadlinenews );[/PHP]
Replace:
[PHP]
if( ($category = (int) $params->get(‘category’, 0)) <= 0 ){
$rows = modJANewsHelperFP::getHLNews ( $numberofheadlinenews );
} else {
$rows = modJANewsHelperFP::getList ( 1, $category, $numberofheadlinenews, ‘created’ );
}
[/PHP]good luck
February 8, 2010 at 1:07 am #331927Tienhc,
Thank you for the code. I’m following your directions and will let you know how it works.
Soon,
DebSaguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
February 8, 2010 at 1:19 am #331929with above codes, allow module to work well as you aspected:
a custom code for the JA News Headline module that will add an option to assign content from a separate category? Independent from the JA News Frontpage module.and more, if you do not choose a category, then the module ‘ll display articles from the “Front-Page articles” source.
February 10, 2010 at 1:51 am #332240Hi Tienhc,
I implemented the codes and both JA News Headline and FrontPage modules now show a category pulldown selection, independent from each other. This is very, very good!
However, I have lost my HOME page. (All other pages show content) The HOME page is blank,void of content showing the error message: Fatal error: Class ‘modJANewsHelperFP’ not found in /home/XXXXX/public_html/modules/mod_janews_fp/mod_janews_fp.php on line 40.
When I set the JA News HEADLINE module from ‘select category’ to a category, I get the blank page with the error message: Fatal error: Class ‘modJANewsHelperFP’ not found in /home/XXXX/public_html/modules/mod_janews_fp/mod_janews_fp.php on line 42.
When I set the JA News FRONTPAGE module from ‘select category’ to a category, I get the blank page with the error message: Fatal error: Class ‘modJANewsHelperFP’ not found in /home/XXXXX/public_html/modules/mod_janews_fp/mod_janews_fp.php on line 40.
We are so close to making this work. What have I done wrong?
Thank you so much,
DebSaguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
February 10, 2010 at 1:54 am #332241The site is using the older version, now please re-dowload the telineii package and get the ja news fp module and upgrade for yours, and then you ‘ll customize follow my way
good luck
February 10, 2010 at 6:25 pm #332301Hi Tienhc,
I recently installed the latest version of Teline II. I have also customized other areas of this template. To re-install would require me to customize the template again. Please take a look at the following codes, which include the replacement codes you provided. Can you help me fix this? –Thank you.
line 30 – 47 at modulesmod_janews_fpmod_janews_fp.xml ———– code replacement
</files>
<params>
<param name=”moduleclass_sfx” type=”text” default=”” label=”Module Class Suffix” description=”A suffix to be applied to the css class of the module (table.moduletable), this allows individual module styling” />
<param name=”@spacer” type=”spacer” default=”” label=”” description=”” /><param name=”hiddenClasses” type=”textarea” default=”” rows=”10″ cols=”30″ label=”HIDDEN CLASSES” description=”HIDDEN CLASSES DESC” />
<param name=”category” type=”category” default=”” label=”CATEGORY SELECTION” description=”CATEGORY SELECTION DESC” />
<param name=”numberofheadlinenews” type=”text” default=”10″ label=”Number of news” description=”Total number of news showed in headline; applied in both layout” />
<param name=”bigitems” type=”text” default=”1″ label=”Number of Featured Articles” description=”Featured Articles is the newest articles and take most of the place of area, should be 1 if you use default_fp.php layout and 5 if you use headline_fp.php” />
<param name=”bigmaxchars” type=”text” default=”0″ label=”Max Chars of Featured News” description=”Maximum number character display” />
<param name=”bigshowimage” type=”radio” default=”1″ label=”Show image on Featured News” description=”Show/Hide image”>
<option value=”1″>show</option>
<option value=”0″>hide</option>
</param>
****************************************************************
line 37 to 51 at file: modulesmod_janews_fpmod_janews_fp.php ———— replacement code$fp_layout = trim($params->get(‘fp_layout’,’default_fp’));
if (strpos($fp_layout, ‘.php’) > 0) $fp_layout = substr($fp_layout, 0, -4);
if( ($category = (int) $params->get(‘category’, 0)) <= 0 ){
$rows = modJANewsHelperFP::getHLNews ( $numberofheadlinenews );
} else {
$rows = modJANewsHelperFP::getList ( 1, $category, $numberofheadlinenews, ‘created’ );
}if (count($rows)) {
$path = JModuleHelper::getLayoutPath(‘mod_janews_fp’, $fp_layout);
if (file_exists($path)) {
require($path);
}
}
?> -
AuthorPosts
This topic contains 10 replies, has 2 voices, and was last updated by Saguaros 14 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum