CTA Featured Threads & Portal

CTA Featured Threads & Portal [Paid] 2.17.0

No permission to buy (£40.00)
It should be in the cta_featuredthreads_featured_list_item template.

You could for example add it to the various divs to add a new custom class to whichever parts you want to style specifically.
You can see how it's done in the list item template, e.g.:
Code:
<div class="{xen:if "{$xenOptions.ctaFtIcon.enabled} AND ({$featuredThread.featured_icon_date} OR ({$featuredThread.default_icon} == 1 AND @ctaFtDefaultIconPath))", 'ctaFtThreadContentIconPage', 'ctaFtThreadContentAvatarPage'}">
 
But that's the thing, I put the code outside of the <li> and then tried it within, for example around the code you just mentioned but nothing is showing. What would be the best spot to put it?
 
I don't really know what you're trying to do, but as above, you can try adding your custom class to the various divs.
 
Well basically I just want to have the first featured thread (the most recent one) as a different div than the rest. I just don't know where to put the code in that template. I figured since it's in the foreach loop that I could just put it at the very top and do an if/else to it but for some reason it's not working there.
 
It won't work there as that parameter isn't exposed to that template.

The other option is to put the conditional statement at the top of the list item template and duplicate the code, adding your own styling.

xen:if
your code
xen:else
default code
/xen:if
 
That's what I meant, but what I did was put:

<xen:if is="{$featuredThread.position} == 1">
test
<xen:else />
default code
</xen:if>

But that doesn't show any difference.
 
It works for me.

You need to use 0, rather than 1 though (I forgot the position count starts from 0).
 
It's the default template, no mods done to it.

This is the exact code I have at the top of cta_featuredthreads_featured_list_item:

<xen:if is="{$featuredThread.position} == 0">
test
<xen:else />

and </xen:if> at the very bottom.
 
Ok for some reason it's not showing properly so I tried:

<xen:if is="{$featuredThread.featured_date} == 1437418103"> (the actual date from the cta featured threads table) and it shows up ok.

Would you recommend I use date? Still though, I don't know how I would grab the most recent one.
 
No, date won't work.

What version are you running?

I can't duplicate the issue you are having, it works as designed for me.
 
Argh, that was it! I had an older version, I just upgraded it to 2.13 and it works. I only had the older one cause it's a testing site right now. Thanks for the help.
 
Hi,

Sorry if this was noted before, but after upgrading to latest version, I get this when I try to feature a thread:


Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'display_poll' in 'field list' - library/Zend/Db/Statement/Mysqli.php:77

Stack Trace

#0 /home/admin/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('INSERT INTO `ct...')
#1 /home/admin/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'INSERT INTO `ct...')
#2 /home/admin/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('INSERT INTO `ct...')
#3 /home/admin/public_html/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `ct...', Array)
#4 /home/admin/public_html/library/XenForo/DataWriter.php(1624): Zend_Db_Adapter_Abstract->insert('cta_ft_featured...', Array)
#5 /home/admin/public_html/library/XenForo/DataWriter.php(1613): XenForo_DataWriter->_insert()
#6 /home/admin/public_html/library/XenForo/DataWriter.php(1405): XenForo_DataWriter->_save()
#7 /home/admin/public_html/library/CTA/FeaturedThreads/ControllerPublic/Thread.php(672): XenForo_DataWriter->save()
#8 /home/admin/public_html/library/XenForo/FrontController.php(347): CTA_FeaturedThreads_ControllerPublic_Thread->actionFeaturedThreadSave()
#9 /home/admin/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/admin/public_html/index.php(13): XenForo_FrontController->run()
#11 {main}

Request State
array(3) {
["url"] => string(56) "https://www.website.co.il/threads/69686/featured-thread-save"
["_GET"] => array(0) {
}
["_POST"] => array(14) {
["title"] => string(59) "ssssssss"
["message_html"] => string(1800) "blabla"
"
["_xfRelativeResolver"] => string(50) "https://www.website.co.il/threads/69686/feature-thread"
["feature_duration"] => string(8) "expiring"
["feature_duration_ttl_value"] => string(1) "2"
["feature_duration_ttl_unit"] => string(4) "days"
["display"] => string(6) "global"
["avatar_icon"] => string(4) "left"
["dismissible"] => string(1) "1"
["_xfConfirm"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(29) "/threads/69686/feature-thread"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}

Any idea?
 
That sounds like one or more of the queries didn't execute in the upgrade script.

Which version did you upgrade from and to?

Can you run this query and choose full texts and paste the output?
Code:
SHOW CREATE TABLE cta_ft_featured_threads
 
I'm finding it impossible to dismiss more than a couple of featured threads. I have permissions set to be able to dismiss, but once I have dismissed a couple the option to dismiss is no longer there.

I'm a bit confused by the options re: dismissable as it appears twice in the options, as well as allow dismissal.

However I assume that if I have permissions to dismiss that should override what is in options shouldn't it?
 
Where are you attempting to dismiss from?
They can't be dismissed from the page.

Note that some featured threads may not be dismissible, if they have been set as that when being featured.
 
Top Bottom