Jump to content

Community

Adriano Faria

Similar Topics on Post Screen

Recommended Posts

%7Boption%7D



File Name: Similar Topics on Post Screen

File Submitter: Adriano Faria

File Submitted: 14 Nov 2011

File Category: Content Management

Supported Versions: IP.Board 3.2.x, IP.Board 3.3.x, IP.Board 3.4.x



This hook will show similar topic titles on post screen, after user types the new topic title.

Settings:

  • Allowed groups to use the hook
  • Forums where the hook will work
  • Number of topics to appear on similar topics list
  • Minimum length per word
  • Group color on user links
  • Search type: all forums or current forum
  • Sort results by 4 options (start date, last post date, posts, views) and sort direction (Asc & Desc)

Note:



here to download this file

Share this post


Link to post
Share on other sites

working as intended :)

on the next revision/update is there any chance you can add an ACP setting to allow admin to select either: simple (see screen shot) or detailed (as it is now) views for the similar topics that are listed
%7Boption%7D

Share this post


Link to post
Share on other sites

Quite confusing your screenshot.



You mean a new template with topic title only ? I do not think it will be widely used. :smile:




yes, just a list of topic titles.

Its preferable to having over a page in height for 5 similar topics IMO. All I want to see is the topic, not who posted it, when they posted it and all that other stuff.

But, I'm happy to edit the template, so I'll crack on and do that instead :)

Rich

Share this post


Link to post
Share on other sites

should anyone else wish to have a more basic look, these were my edits:
in ACP > look and feel > manage skin sets and templates > [your skin] > Post Screen > similarTopicsAjax

replace all code with:


<fieldset>

  <h3 class='maintitle' style='margin-bottom: 0px;'>{$this->lang->words['similar_topics']}</h3>

<div class='ipsBox table_wrap' style='margin-bottom: 10px;'><div class='ipsBox_container'>

  <table class='ipb_table topic_list hover_rows'>

   <tr class='header hide'>

   <th scope='col' class='col_f_topic'>{$this->lang->words['forum_topic']}</th>

   </tr>

   <if test="hassimilartopics:|:is_array( $topic_data ) AND count( $topic_data )">

	<foreach loop="topics:$topic_data as $tid => $data">

				 <tr class='__topic <if test="!$data['topic_data']['folder_img']['is_read']">unread</if> expandable' id='trow_{$data['topic_data']['tid']}' data-tid="{$data['topic_data']['tid']}">			

				  <td class='col_f_content <if test="hasmodlinks:|:$this->memberData['is_mod'] == 1 || $data['forum_data']['permissions']['TopicSoftDelete']"> with_mod_links</if>'>

				   <if test="hasPrefix:|:!empty($data['topic_data']['tags']['formatted']['prefix'])">

					{$data['topic_data']['tags']['formatted']['prefix']}

				   </if>

				   <h4>{$data['topic_data']['prefix']} <if test="$data['topic_data']['topic_hasattach']">

  <a href="{parse url="app=forums&amp;module=forums&amp;section=attach&amp;tid={$data['topic_data']['tid']}" base="public"}" title="{parse expression="intval($data['topic_data']['topic_hasattach'])"} {$this->lang->words['topic_attach']}" onclick="return ipb.forums.retrieveAttachments( {$data['topic_data']['tid']} );">{parse replacement="post_attach_link"}</a>

	 </if>

	<a{$data['topic_data']['style']} rel="external" id="tid-link-{$data['topic_data']['tid']}" href="{$data['topic_data']['_url']}" title='{$this->lang->words['topic_started_on']} {parse date="$data['topic_data']['start_date']" format="LONG"}' class='topic_title'>{$data['topic_data']['title']}</a>

  </h4>

				   <br />

				 <td class='col_f_views desc blend_links'>

				   <ul>

					<li>

								 <if test="queuedpostsImg:|:($this->memberData['is_mod'] AND $data['topic_data']['_hasqueued'])">

								  <a href='{parse url="showtopic={$data['topic_data']['tid']}&amp;modfilter=invisible_posts" seotitle="{$data['topic_data']['title_seo']}" template="showtopic" base="public"}' title='{$this->lang->words['view_uapproved_posts']}' data-tooltip="{parse expression="sprintf( $this->lang->words['topic_queued_count'], $data['topic_data']['topic_queuedposts'] )"}"><img src='{$this->settings['img_url']}/bullet_error.png' alt='' /></a>

								 </if>

								 <if test="deletedPostsImg:|:($data['forum_data']['permissions']['PostSoftDeleteSee'] AND $data['topic_data']['topic_deleted_posts'])">

								  <a href='{parse url="showtopic={$data['topic_data']['tid']}&amp;modfilter=deleted_posts" seotitle="{$data['topic_data']['title_seo']}" template="showtopic" base="public"}' title='{$this->lang->words['view_deleted_posts']}'><img src='{$this->settings['img_url']}/bullet_delete.png' alt='' /></a>

								 </if>

								 <if test="isLink:|:$data['topic_data']['state'] != 'link'">

								  <if test="isHot:|:$data['topic_data']['folder_img']['is_hot']">

								   <span class='ipsBadge ipsBadge_orange'>{$this->lang->words['topic_is_hot']}</span>&nbsp;

								  </if>

								 </if>

					</li>

									   </ul>

				  </td>

</td>

				  <td class='col_r_title __topic_preview'>

				   <if test="$this->registry->permissions->check( 'read', $data['forum_data'] )">

					<a href='{$data['topic_data']['_url']}' class='expander closed' title='{$this->lang->words['view_topic_preview']}'>&nbsp;</a>&nbsp;{$this->lang->words['view_topic_preview']}

				   </if>

				  </td>

				 </tr>

	</foreach>

   </if>

  </table></div></div>

</fieldset>

optionally, I also changed the topic preview expander opacity so it wasn't hidden in ipb-styles.css find


table.ipb_table .expander {

visibility: hidden;

width: 16px;

height: 16px;

display: inline-block;

}

table.ipb_table tr:hover .expander { visibility: visible; opacity: 0.2; }

replace with


table.ipb_table .expander {

visibility: visible;

opacity: 0.5;

width: 16px;

height: 16px;

display: inline-block;

}

table.ipb_table tr:hover .expander { visibility: visible; opacity: 0.7; }



screenshot:
%7Boption%7D

regards

Richard

PS: I know I'm posting code from a paid hook, but only the STRIPPED DOWN code, I would not post Adriano's original code :smile:

Edited by Richard C

Share this post


Link to post
Share on other sites

Really good mod and I do like the 'stripped' down version... one thing I would like to suggest... I would like to offer this only to new members, therefore could you look at adding a setting so that it only shows for members below X number of posts?

That way anyone with say less than 40 posts will be shown the similar topics... it would greatly help to reduce duplicate content without annoying more seasoned members who post regularly and don't need the feature.

Regards

Jim

Share this post


Link to post
Share on other sites

I just bought this module and tried to install it on our forum but it does not work. The javascript does not hook into the source and we cant get this to work proper. Adriano, could you please help us? I will send you a PM to.

Share this post


Link to post
Share on other sites

The problem happends when you're not using the default theme of IPBoard. If you've created a custom skin, this hook does not create a bit automaticly for your custom skin. You need to manually do that for this to work. That solved our problem!

Share this post


Link to post
Share on other sites

Version 2.0.1 released:

  • Added a setting to restrict by post number: all users (from selected groups) with less posts than what admin fill in setting, will use the hook
  • Added a setting to Admin choose a theme: Default theme (like a forum, from previous version) and a resumed theme (thanks to Richard), where will appear only topic title and start date.

Share this post


Link to post
Share on other sites

I would say that as long as this mod does not use its own language file and relies solely on the IPS language settings when it should work with any language that IPS supports and has a language pack for.

If it uses its own language strings/words (or however it is correctly described) then those words would only appear in the language(s) this mod has produced, eg English.

Share this post


Link to post
Share on other sites

Any chance to get demo? Encoded version for 2-3 days or something? This mod is extremely usefull for my board if it supports different charsets, but useless if not. Thanks.

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...