AlphaIndex with published items in the future

More
13 years 8 months ago - 13 years 8 months ago #10204 by MartijnM
I do have an items published with a publishing date in the future.
As I look in the mini-gallery the letter for the item is clickable (no other items for that letter).
The letter should not be clickable in my opinion.
Example: www.reisverslagen.net/blog/

Martijn Maandag
www.reisverslagen.net
Last edit: 13 years 8 months ago by yopyop001. Reason: change title : Gallery by AlphaIndex

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

More
13 years 8 months ago #10205 by yopyop001
Hi,

you are right,
Can you post an issue in the bug tracker :
code.google.com/p/flexicontent/issues/list


Can you try to replace the function getAlphaIndex() in
components/com_flexicontent/models/category.php
by :
Code:
/** * Method to build the alphabetical index * * @access public * @return string * @since 1.5 */ function getAlphaindex() { global $mainframe; $user = & JFactory::getUser(); $gid = (int) $user->get('aid'); $lang = JRequest::getWord('lang', '' ); $now = $mainframe->get('requestTime'); $nullDate = $this->_db->getNullDate(); // Get the category parameters $cparams = $this->_category->parameters; // show unauthorized items $show_noauth = $cparams->get('show_noauth', 0); // Filter the category view with the active active language $and = FLEXI_FISH ? ' AND ie.language LIKE ' . $this->_db->Quote( $lang .'%' ) : ''; $and2 = $show_noauth ? '' : ' AND c.access <= '.$gid.' AND i.access <= '.$gid; //Is the content current $and3 = ' AND ( i.publish_up = '.$this->_db->Quote($nullDate).' OR i.publish_up <= '.$this->_db->Quote($now).' )'; $and3.= ' AND ( i.publish_down = '.$this->_db->Quote($nullDate).' OR i.publish_down >= '.$this->_db->Quote($now).' )'; $_group_cats = implode("','", $this->_group_cats); $query = 'SELECT LOWER(SUBSTRING(i.title FROM 1 FOR 1)) AS alpha' . ' FROM #__content AS i' . ' LEFT JOIN #__flexicontent_items_ext AS ie ON i.id = ie.item_id' . ' LEFT JOIN #__flexicontent_cats_item_relations AS rel ON rel.itemid = i.id' . ' LEFT JOIN #__categories AS c ON c.id IN (\''. $_group_cats .'\')' . ' WHERE rel.catid IN (\''. $_group_cats .'\')' . $and . ' AND i.state IN (1, -5)' . ' AND i.sectionid = '.FLEXI_SECTION . $and2 . $and3 . ' GROUP BY alpha' . ' ORDER BY alpha ASC'; ; $this->_db->setQuery($query); $alpha = $this->_db->loadResultArray(); return $alpha; }

And tell me if it's working for you.

I think there is the same problem in the item count for subcategories. I will have a look ans submit code if it's right.

Regards

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

More
13 years 8 months ago #10206 by MartijnM
The solution worked for me, thank you.
I posted an issue in the bug tracker.

Martijn Maandag
www.reisverslagen.net

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.500 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