Various modifications for phpBB3Quick Title Edition / Top Five

Snippets for phpBB3
Previous topicNext topic
User avatar

Topic Author
dmzx
Founder
Founder
Magic user status: Online
Posts: 5975
Joined: Jan 13th, '14, 20:45
    unknown unknown

Quick Title Edition / Top Five

Post by dmzx »

Quick Title Edition / Top Five

open includes/top_five.php
Find This may be a partial find and not the whole line

Code: Select all

global $auth, $cache, $user, $db, $phpbb_root_path, $phpEx, $template, $config;
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

//-- mod : quick title edition -------------------------------------------------
//-- add
	global $qte;
//-- fin mod : quick title edition ---------------------------------------------
Find This may be a partial find and not the whole line

Code: Select all

$result = $db->sql_query_limit($db->sql_build_query('SELECT', $sql_ary), $how_many);
Add before Add these lines on a new blank line before the preceding line(s) to find

Code: Select all

//-- mod : quick title edition -------------------------------------------------
//-- add
	$sql_ary['SELECT'] = str_replace('t.topic_title,', 't.topic_title, t.topic_attr_id, t.topic_attr_user, t.topic_attr_time,', $sql_ary['SELECT']);
//-- fin mod : quick title edition ---------------------------------------------
Find This may be a partial find and not the whole line

Code: Select all

'TOPIC_TITLE' 	=> $user->lang['IN'] . ' ' . $topic_title));
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

//-- mod : quick title edition -------------------------------------------------
	//-- add
			if ( !empty($row['topic_attr_id']))
			{
				$tpl_row = array(
					'S_TOPIC_ATTR' => true,
					'TOPIC_ATTRIBUTE' => $qte->attr_display($row['topic_attr_id'], $row['topic_attr_user'], $row['topic_attr_time']),
				);
				$template->alter_block_array('top_five_topic', $tpl_row, true, 'change');
			}			
	//-- fin mod : quick title edition ---------------------------------------------
open styles/prosilver/template/top_five_body.html
Find This may be a partial find and not the whole line

Code: Select all

<td valign="top"><!-- BEGIN top_five_topic --><!-- IF top_five_topic.NO_TOPIC_TITLE-->{top_five_topic.NO_TOPIC_TITLE}<!-- ELSE --><!-- IF top_five_topic.S_TOPIC_ATTR -->
In line find This is a partial match of a line for in-line operations

Code: Select all

<a href="{top_five_topic.U_TOPIC}">{top_five_topic.TOPIC_TITLE}</a><br />
In line add before

Code: Select all

<!-- IF top_five_topic.S_TOPIC_ATTR -->{top_five_topic.TOPIC_ATTRIBUTE}<!-- ENDIF -->


Quick Title Edition Top Five.png
Grtz dmzx
You do not have the required permissions to view the files attached to this post.
binance.com ;) try it!
User avatar

kraminoft
Users
Users
Magic user status: Offline
Posts: 5
Joined: Aug 30th, '17, 18:50
    Ubuntu Firefox

Re: Quick Title Edition / Top Five

Post by kraminoft »

How to do this in the new version of the top five?
User avatar

jan_2017
Users
Users
Magic user status: Offline
Posts: 203
Joined: Feb 5th, '17, 09:21
    Android Chrome

Re: Quick Title Edition / Top Five

Post by jan_2017 »

kraminoft wrote: Mar 11th, '18, 00:39 How to do this in the new version of the top five?
I need that for the extension "recent topic" too. Can one of you give me a hint please?

:whistl:
Previous topicNext topic