Guest Danny Michel Posted April 3, 2011 Posted April 3, 2011 i cleaned it up<style type="text/css" > /* Inline CSS */ table.recentTopicsTable { border: 0; } #recentTopics { border-bottom: 4px solid #D5DDE5; } .block_wrap h3.collapsed a.toggle { background-image: url({$this->settings['img_url']}/cat_maximize.png); } </style> <style> table.novo a{ padding-left: 5px; text-decoration: none;} </style> <script src="{$this->settings['public_dir']}js/ips.recentTopicsHook.js" type="text/javascript"></script> <script src="{$this->settings['public_dir']}js/ips.forums.js" type="text/javascript"></script> <script type="text/javascript"> ipb.recentTopics.updateInterval = parseInt( {$this->settings['topicosrecentes_updateInterval']} ); </script> <div class='block_wrap' id="recentTopicsWrapper"> <h3 id='hook_recentTopics' class='maintitle'><a class='right toggle' href='#' title='{$this->lang->words['click_toggle']}'>{$this->lang->words['click_toggle']}</a>{$this->lang->words['topicos_recentes']}</h3> <table class="ipb_table" cellspacing="0" cellpadding="0"> <tr class="header"> <th class='col_f_icon' scope="col"></th> <th class='col_f_topic' scope="col">{$this->lang->words['forum_topic']}</th> <th class="col_f_starter short" scope="col">Started By</th> <th class='col_f_views stats' scope="col">{$this->lang->words['stats']}</th> <th class='col_f_post' scope="col">{$this->lang->words['forum_last_post_info']}</th> </tr> <if test="is_array( $topicos ) && count( $topicos )"> {parse striping="topicosrecentes_hook" classes="row1,row2"} <foreach loop="topicosrecentes_hook:$topicos as $r"> <php> $class = "class='altrow'"; $classTwo = ''; </php> <tr class="{parse striping="topicosrecentes_hook"}"> <td {$class} align='center' width='4%'> <a title="{$this->lang->words['topico_lido']}" href="{parse url="app=forums&module=ajax&section=recentTopics&do=maskasread&f={$r['topico']['forum_id']}&t={$r['topico']['tid']}&secure_key={$this->member->form_hash}" base="public"}">{parse replacement="{$r['image']}"}</a> </td> <td {$class2} class='__topic __tid{$r['topico']['tid']}' width='52%'> <if test="$r['topico']['state'] !='link'"><span class='topic_preview right'>{parse template="topic_popup" group="global" params="$r['topico']['tid']"}</span></if> <if test="$r['topico']['pinned']"><span class='topic_prefix'>{$this->settings['pre_pinned']}</span></if> <if test="$r['topico']['poll_state']"><span class='topic_prefix'>{$this->settings['pre_polls']}</span></if> <if test="$this->settings['topicosrecentes_movidos'] AND $r['topico']['state'] == 'link'"><span class='topic_prefix'>{$this->settings['pre_moved']}</span></if> <if test="$r['topico']['topic_hasattach']"> <a class="topic_title" href="{parse url="app=forums&module=forums&section=attach&tid={$r['topico']['tid']}" base="public"}" title="{parse expression="intval($r['topico']['topic_hasattach'])"} {$this->lang->words['topic_attach']}" onclick="return ipb.forums.retrieveAttachments( {$r['topico']['tid']} );">{parse replacement="t_attach"}</a> </if> <if test="istracking:|:! empty($r['topico']['trackingTopic'])">{parse replacement="watch_small"}</if> <a class="topic_title" href='{parse url="showtopic={$r['topico']['tid']}&view=getnewpost" base="public" template="showtopic" seotitle="{$r['topico']['title_seo']}"}' title='{$r['topico']['title']}'>{IPSText::truncate($r['topico']['title'],60)}</a> {$r['topico']['_rate_img']}<br /> <span class='desc'>{$this->lang->words['cat_name']}: <foreach loop="topicsForumTrail:$r['breadcrumb'] as $i => $f"> <a href='{parse url="{$f[1]}" template="showforum" seotitle="{$f[2]}" base="public"}'>{$f[0]}</a> <if test="notLastFt:|:$i+1 != count( $r['breadcrumb'] )">{parse replacement="f_nav_sep"}</if> </foreach> </span> </td> <td {$class} align='center' width='15%'><address class="author vcard">{IPSLib::makeProfileLink(IPSLib::makeNameFormatted( $r['topico']['starter_name'], $r['topico']['grupo1']), $r['topico']['starter_id'])}{parse template="user_popup" group="global" params="$r['topico']['starter_id'], $r['topico']['nome1']"}</address> </td> <td {$class2} align='right' width='11%'> <ul> <li> <span><a href="{parse url="app=forums&module=extras&section=stats&do=who&t={$r['topico']['tid']}" base="public"}" onclick="return ipb.forums.retrieveWhoPosted( {$r['topico']['tid']} );">{$this->registry->getClass('class_localization')->formatNumber( $r['topico']['posts'] )}</a> {$this->lang->words['replies']}</span> </li> <li> <span>{$this->registry->getClass('class_localization')->formatNumber( $r['topico']['views'] )} {$this->lang->words['views']}</span> </li> </ul> </td> <td {$class} width='18%'><ul class="last_post"> <li><a href='{parse url="showtopic={$r['topico']['tid']}&view=getlastpost" base="public" template="showtopic" seotitle="{$r['topico']['title_seo']}"}' title='{$this->lang->words['view_last_post']}'>{parse replacement="f_lastpost"}</a> <a href='{parse url="showtopic={$r['topico']['tid']}&view=getlastpost" base="public" template="showtopic" seotitle="{$r['topico']['title_seo']}"}' title='{$this->lang->words['view_last_post']}'>{parse date="$r['topico']['last_post']" format="short"}</a></li><li>{$this->lang->words['forum_by']} <address class="author vcard">{IPSLib::makeProfileLink(IPSLib::makeNameFormatted( $r['topico']['last_poster_name'], $r['topico']['grupo2']), $r['topico']['last_poster_id'])}{parse template="user_popup" group="global" params="$r['topico']['last_poster_id'], $r['topico']['nome2']"}</address></li> </ul> </td> </tr> </foreach> </if> </table> </div>
bearback Posted April 3, 2011 Posted April 3, 2011 This option in user control panel will appear for those who can view the block in board index and this is you as admin who set in Admin CP. If you disallow MEMBERS to use the hook, those settings won't appear in Control Panel for users of MEMBERS groups. ok thanks for the members who can choose how many topics will be displayed i just wanted a limit on the maximuim amount they can choose or it could be abused by having to many topics showing. as example a member could pick to have 20 topics showing and impact the server if i have 500 members do the same. thanks
Adriano Faria Posted April 3, 2011 Author Posted April 3, 2011 Edit User Control Panel -> recent_topics template and you'll see the options from 1 to 10 in a select. You can leave the values you want.
bearback Posted April 3, 2011 Posted April 3, 2011 Edit User Control Panel -> recent_topics template and you'll see the options from 1 to 10 in a select. You can leave the values you want. thats great thank you for your time, most appreciated
sk8er_boi Posted April 3, 2011 Posted April 3, 2011 I'll give it a try. Well, this is what really makes this hook so nice, but I can make it as a setting (default value: ON)... so you'll can disable it. Anyway, have you tried to use a higher number of seconds (45s, 1min, etc.) ? I tried 90, but it refreshes when the page loads, and it's a massive load. Every select query execution time is > 5 secs. It gives hardons on my i7 12gb ram machine.
Eskimo Huskies Posted April 7, 2011 Posted April 7, 2011 Is there anyway that this hook can be hidden from members of less than 1 post. Im trying to get new members to post their introductions before they view the rest of the board. So far I have achieved this but this mod is enabling them to gain access to other areas.
Adriano Faria Posted April 7, 2011 Author Posted April 7, 2011 No. Feel free to PM me for a custom tiny edit.
bearback Posted April 7, 2011 Posted April 7, 2011 Is there anyway that this hook can be hidden from members of less than 1 post. Im trying to get new members to post their introductions before they view the rest of the board. So far I have achieved this but this mod is enabling them to gain access to other areas. you can do that by using the hooks group settings in acp if you have your groups setup correctly thats is
Adriano Faria Posted April 7, 2011 Author Posted April 7, 2011 I don't think so. If he choose MEMBERS, will show the block for members with 0, 100, 1000000000 (etc.) posts. He doesn't want to show for users with 0 POSTS. You need a small change in the script but I don't see this as a nice feature to change the hook and release a new version, so I can make it as a custom job.
Eskimo Huskies Posted April 7, 2011 Posted April 7, 2011 I don't think so. If he choose MEMBERS, will show the block for members with 0, 100, 1000000000 (etc.) posts. He doesn't want to show for users with 0 POSTS. You need a small change in the script but I don't see this as a nice feature to change the hook and release a new version, so I can make it as a custom job. You have it in One. :thumbsup:
Adriano Faria Posted April 7, 2011 Author Posted April 7, 2011 What's New in Version 2.1.2:Added a setting to specify a minimum posts users must have to view the Recent Topics block on board index
bearback Posted April 7, 2011 Posted April 7, 2011 I don't think so. If he choose MEMBERS, will show the block for members with 0, 100, 1000000000 (etc.) posts. He doesn't want to show for users with 0 POSTS. Bit late now but....... got mine setup ok for what he wants, just the same setup as not allowing guests to see recent topics or posts. Just an example: setup group "members" in members user groups set Promote members of this group to: full members after 1 post create another user group "full members" not forgetting to setup the user permissions for both groups in recent topics hook options Groups Select here the user groups that will can see the list - DO NOT INCLUDE MEMBERS The recent topics will only show only when they have posted one post and been moved to the new user group. job done
Guest Danny Michel Posted April 9, 2011 Posted April 9, 2011 i dunno if it's because i have edited it, but you can't use the minimize button on this, can you?
Adriano Faria Posted April 9, 2011 Author Posted April 9, 2011 Yes. Restore the template and try again.
BCFosheezy Posted April 25, 2011 Posted April 25, 2011 When I went from 2.1.0 to 2.1.2, I get this issue. As a guest, everything functions perfectly. When logged in as a member, admin, mod, etc the "loading" stays at the top of the page indefinitely. It never goes away and the topics do not ever refresh. What have I done wrong and what can I do to fix it?
Adriano Faria Posted April 25, 2011 Author Posted April 25, 2011 Nothing was changed in JS file. Anyway, go to your Control Panel -> Forums -> Recent Topics and uncheck the checkbox to show the block in index. Save. Then you check it again and save it.
BCFosheezy Posted April 25, 2011 Posted April 25, 2011 Thanks for the reply. I think that showed the glitch. UserCP > Forums > Recent Topics shows the the same options as "board preferences". Screen shot attached so you can see it. Site url: http://www.eCrack.net/forums
Adriano Faria Posted April 25, 2011 Author Posted April 25, 2011 That is what should appear: Reinstall the hook and try to see if it works on default skin.
BCFosheezy Posted April 25, 2011 Posted April 25, 2011 Yeah I know it's supposed to look like that. It just doesn't for some reason and I don't know why. I've uninstalled and reinstalled 2.1.2 at least 3 times since I began posting here. Clearing the cache etc does not help. Do you have any suggestions?
Adriano Faria Posted April 25, 2011 Author Posted April 25, 2011 Which IP.Board version ? Probably is older than 3.1.3! It works only in 3.1.3 and 3.1.4.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.