Mark List item as New

More
9 years 1 week ago #58295 by eifelnetz
Hello, in the Module "default-news.php" I like to add a "NEW" text in the beginning of the Article-List, when the creation Date is earlier then X-Days (e.g. 4 Days) from today. Here is a Solution for a "normal" Joomla-Page: forum.joomla-nafu.de/joomla!-allgemein/b...eu'-markieren/msg83/ .

I tried to calculate with "$item->date_created;", but it doenst work.

How is the Solution for this flexicontent Module?

Thx!
Michael

Please Log in or Create an account to join the conversation.

More
9 years 1 week ago #58296 by micker
Replied by micker on topic Mark List item as New
can you post your code to understand ?

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
9 years 1 week ago #58297 by eifelnetz
Replied by eifelnetz on topic Mark List item as New
Here is the Code of the original default-news.php in modules/mod_flexicontent/tmpl
Code:
<?php // no direct access defined('_JEXEC') or die('Restricted access'); ?> <div class="default mod_flexicontent_wrapper mod_flexicontent_wrap<?php echo $moduleclass_sfx; ?>" id="mod_flexicontent_default<?php echo $module->id ?>"> <?php // Display FavList Information (if enabled) include(JPATH_SITE.'/modules/mod_flexicontent/tmpl_common/favlist.php'); // Display Category Information (if enabled) include(JPATH_SITE.'/modules/mod_flexicontent/tmpl_common/category.php'); $ord_titles = array( 'popular'=>JText::_( 'FLEXI_MOST_POPULAR'), 'commented'=>JText::_( 'FLEXI_MOST_COMMENTED'), 'rated'=>JText::_( 'FLEXI_BEST_RATED' ), 'added'=> JText::_( 'FLEXI_RECENTLY_ADDED'), 'addedrev'=>JText::_( 'FLEXI_RECENTLY_ADDED_REVERSE' ), 'updated'=>JText::_( 'FLEXI_RECENTLY_UPDATED'), 'alpha'=> JText::_( 'FLEXI_ALPHABETICAL'), 'alpharev'=>JText::_( 'FLEXI_ALPHABETICAL_REVERSE'), 'id'=>JText::_( 'FLEXI_HIGHEST_ITEM_ID'), 'rid'=>JText::_( 'FLEXI_LOWEST_ITEM_ID'), 'catorder'=>JText::_( 'FLEXI_CAT_ORDER'), 'random'=>JText::_( 'FLEXI_RANDOM' ), 'field'=>JText::_( 'FLEXI_CUSTOM_FIELD' ), 0=>'Default' ); $separator = ""; foreach ($ordering as $ord) : echo $separator; if (isset($list[$ord]['featured']) || isset($list[$ord]['standard'])) { $separator = "<div class='ordering_seperator' ></div>"; } else { $separator = ""; continue; } ?> <div id="<?php echo 'order_'.( $ord ? $ord : 'default' ) . $module->id; ?>" class="mod_flexicontent"> <?php if ($ordering_addtitle && $ord) : ?> <div class='order_group_title'><?php echo $ord_titles[$ord]; ?></div> <?php endif; ?> <?php if (isset($list[$ord]['featured'])) : ?> <!-- BOF featured items --> <ul class="mod_flexicontent<?php echo $moduleclass_sfx; ?> mod_flexicontent_featured"> <?php foreach ($list[$ord]['featured'] as $item) : ?> <li class="<?php echo $item->is_active_item ? 'fcitem_active' : ''; ?>" > <?php if ($add_tooltips) : ?> <a href="<?php echo $item->link; ?>" class="hasTip fcitem_link" title="<?php echo htmlspecialchars($item->fulltitle, ENT_COMPAT, "UTF-8").'::'.htmlspecialchars($item->text, ENT_COMPAT, "UTF-8"); ?>"> <?php echo $item->date_created; ?>: <b><?php echo $item->title; ?> </a></b> <?php else : ?> <a href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a> <?php endif; ?> </li> <!-- EOF current item --> <?php endforeach; ?> </ul> <!-- EOF featured items --> <?php endif; ?> <?php if (isset($list[$ord]['standard'])) : ?> <!-- BOF standard items --> <ul class="mod_flexicontent<?php echo $moduleclass_sfx; ?> mod_flexicontent_standard"> <?php foreach ($list[$ord]['standard'] as $item) : ?> <li class="<?php echo $item->is_active_item ? 'fcitem_active' : ''; ?>" > <?php if ($add_tooltips) : ?> <a href="<?php echo $item->link; ?>" class="hasTip fcitem_link" title="<?php echo htmlspecialchars($item->fulltitle, ENT_COMPAT, "UTF-8").'::'.htmlspecialchars($item->text, ENT_COMPAT, "UTF-8"); ?>"> <?php echo $item->title; ?> </a> <?php else : ?> <a href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a> <?php endif; ?> </li> <!-- EOF current item --> <?php endforeach; ?> </ul> <!-- EOF standard items --> <?php endif; ?> </div> <?php endforeach; ?> <?php // Display readon of module include(JPATH_SITE.'/modules/mod_flexicontent/tmpl_common/readon.php'); ?> </div>

And this is the code from forum.joomla-nafu.de/joomla!-allgemein/b...eu'-markieren/msg83/ , where they explain, how to mark as new
Code:
$date = JFactory::getDate($this->item->created); // in Kategrorieansichten $date = JFactory::getDate($this->article->created); // in der Beitragsansicht $now = JFactory::getDate(); $days = '3'; echo $now->diff($date)->format('%a') <= $days ? ' new-article' : '';

thx!

Please Log in or Create an account to join the conversation.

More
9 years 1 week ago #58298 by micker
Replied by micker on topic Mark List item as New
did you see you have markup option in category view ?

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
9 years 1 week ago #58300 by eifelnetz
Replied by eifelnetz on topic Mark List item as New
Oh no, I didn't. Where can I find it (in the mod_flexicontent too)? And can select, for how long this ist marked up?

Please Log in or Create an account to join the conversation.

More
9 years 1 week ago #58301 by micker
Replied by micker on topic Mark List item as New
In catégorie option or global config
Markup tab all is in
For universal universal module not sûre
Gobto item display tab

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]
The following user(s) said Thank You: eifelnetz

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 1.038 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline