| 09:20 |
andreaswolf |
Did anybody of you experience problems with the new login after expired sessions? |
| 09:20 |
andreaswolf |
The ExtJS popup window |
| 14:17 |
riano |
hello hello! I've got need for a pretty particular wrapper around tt_news, I'd like each item to have a unique class so I can style them seperatelly |
| 14:39 |
mquintus |
riano: each tt_news item a different class? |
| 14:39 |
riano |
yeah, suppose that explaination lacks a bit.. |
| 14:39 |
mquintus |
riano: hehe, right you are |
| 14:40 |
riano |
I've got a news-latest container, I'd like the items to be classed like, uhm, news-latest-item-first -second -third -fourth or with numbers is fine as well |
| 14:40 |
riano |
I just need them to be different from the next |
| 14:40 |
riano |
that any better? |
| 14:42 |
mquintus |
riano: when they just habe to be different, use the marker ###NEWS_UID### in your template |
| 14:42 |
mquintus |
s/habe/have/ |
| 14:43 |
riano |
well, NEWS_UID wont work.. |
| 14:43 |
riano |
the news items will change, but the classes need to be applied still |
| 14:43 |
mquintus |
riano: if you want to enumerate them, you should try to propagate an own marker |
| 14:44 |
riano |
right! |
| 14:44 |
riano |
.. any tips? :D |
| 14:44 |
mquintus |
yeah, there is a hook |
| 14:44 |
mquintus |
that you can use |
| 14:45 |
riano |
hm |
| 14:45 |
mquintus |
use google |
| 14:46 |
mquintus |
extraItemMarkerHook |
| 14:47 |
riano |
hm, google took me to find "num_items_cur_plugin" |
| 14:49 |
riano |
hrm, doesn't seem to work just yet |
| 14:52 |
mquintus |
riano: You can use that. I just added in typoscript: plugin.tt_news.itemMarkerArrayFunc = user_displayArticleNumbers |
| 14:53 |
riano |
back to google for me with that |
| 14:54 |
mquintus |
i've got a solution for your specific problem from google |
| 14:54 |
mquintus |
# include the php script |
| 14:54 |
mquintus |
includeLibs.displayArticleNumbers = EXT:sb_article_tt_news/articleNumber_itemMarkerArrayFunc.php |
| 14:54 |
mquintus |
# call user function |
| 14:54 |
mquintus |
plugin.tt_news.itemMarkerArrayFunc = user_displayArticleNumbers |
| 14:54 |
mquintus |
then php code for the function |
| 14:54 |
mquintus |
function user_displayArticleNumbers($markerArray,$row) { |
| 14:54 |
mquintus |
$res=$GLOBALS['TYPO3_DB']->exec_SELECTquery('SELECT','tx_sbarticlettnews_artnr','hidden=0 AND deleted=0 AND piVar=\'tx_ttnews[tt_news]='.$row['uid'].'\''); |
| 14:54 |
mquintus |
$markerArray['###articleNumber###']=$row; |
| 14:54 |
mquintus |
return $markerArray; |
| 14:54 |
mquintus |
} |
| 14:54 |
riano |
.. your google fu is better than mine? damn, thanks :D |
| 14:55 |
mquintus |
I just put my user functions in fileadmin/classes/ |
| 14:55 |
mquintus |
hehe, thanks. good luck |
| 14:56 |
riano |
does this need the sbarticle extension? |
| 14:56 |
mquintus |
no |
| 14:57 |
mquintus |
just put the php file in fileadmin, and correct the above paths |
| 15:00 |
riano |
it replaces the marker, but with nothing.. hm |
| 15:01 |
riano |
it's a good start though, I got a marker that's getting replaced now |
| 15:08 |
riano |
<?php $rowposition = 0; function user_displayArticleNumbers($markerArray,$row) { global $rowposition; $markerArray['###articleNumber###']=$rowposition; $rowposition++; return $markerArray; } ?> |
| 15:08 |
riano |
that's got it working :) |
| 15:08 |
riano |
mquintus: thanks for your help, saved me a lot of time figuring it out on my own :) |
| 21:21 |
Bitcrusher |
evening guys |
| 21:34 |
andreaswolf |
Hi |