[ABD] [3.1] [pre]fixed - Topic Prefixes extension

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
Lunaus
Registered User
Posts: 8
Joined: Thu Oct 20, 2016 12:58 am

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by Lunaus » Fri Oct 28, 2016 3:56 am

Alright, works great!

Hartenheer
Registered User
Posts: 619
Joined: Fri Jan 23, 2015 12:23 pm
Name: Willem Hartman
Contact:

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by Hartenheer » Fri Oct 28, 2016 7:54 am

Nice extension, I hope he will soon accommodate existing forums.

I use now trader-master, has been abandoned.
afraid not work in 3.2

Hartenheer
Registered User
Posts: 619
Joined: Fri Jan 23, 2015 12:23 pm
Name: Willem Hartman
Contact:

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by Hartenheer » Sat Oct 29, 2016 5:36 pm

I have tried installing on test forum

For a beginner impossible
understand little of the explanation

I download programs, and Extensions Manager read this

Getting the latest version failed.
The requested file, prefix.json, could not be found

User avatar
SalazarAG
Registered User
Posts: 665
Joined: Mon Mar 30, 2015 10:48 am

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by SalazarAG » Mon Oct 31, 2016 5:04 am

Hi imkingdavid ! =)


I know you do not intend to add this feature, but you can help me to add myself? Please.


I refer to the brackets [ and ] which lie between the prefix in the page title in the browser


I know I could add "[" and "]" to create a prefix but use black theme is showing the brackets and I just wanted them in the page title. I found this part of the code in listener.php, I think it is here that change. If it is not too difficult, you can help me with this?

Code: Select all

/**
	 * Get the parsed prefix for the current topic, output it to the template
	 * Also gets a plaintext version for the browser page title
	 *
	 * @param Event $event Event object
	 * @return null
	 */
	public function get_viewtopic_topic_prefix($event)
	{
		$event['page_title'] = $this->load_prefixes_topic($event, 'topic_data') . $event['page_title'];
	}


Good evening!
I'm sorry for my English. Google Translator does a bad job. :D

User avatar
imkingdavid
Former Team Member
Posts: 2664
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King
Contact:

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by imkingdavid » Mon Nov 07, 2016 4:15 am

SalazarAG,

Yes, if you change the line to look like this it should work:

Code: Select all

$event['page_title'] = '[' . $this->load_prefixes_topic($event, 'topic_data') . ']' . $event['page_title'];
Hartenheer wrote:I have tried installing on test forum

For a beginner impossible
understand little of the explanation

I download programs, and Extensions Manager read this

Getting the latest version failed.
The requested file, prefix.json, could not be found
What version of phpBB are you using? I have no trouble installing the extension.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

Hartenheer
Registered User
Posts: 619
Joined: Fri Jan 23, 2015 12:23 pm
Name: Willem Hartman
Contact:

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by Hartenheer » Mon Nov 07, 2016 8:37 am

Hartenheer wrote:I have tried installing on test forum

For a beginner impossible
understand little of the explanation

I download programs, and Extensions Manager read this

Getting the latest version failed.
The requested file, prefix.json, could not be found
What version of phpBB are you using? I have no trouble installing the extension.[/quote]


I use 5.6.23

User avatar
SalazarAG
Registered User
Posts: 665
Joined: Mon Mar 30, 2015 10:48 am

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by SalazarAG » Mon Nov 07, 2016 9:27 am

imkingdavid wrote:SalazarAG,

Yes, if you change the line to look like this it should work:

Code: Select all

$event['page_title'] = '[' . $this->load_prefixes_topic($event, 'topic_data') . ']' . $event['page_title'];
Hartenheer wrote:I have tried installing on test forum

For a beginner impossible
understand little of the explanation

I download programs, and Extensions Manager read this

Getting the latest version failed.
The requested file, prefix.json, could not be found
What version of phpBB are you using? I have no trouble installing the extension.
Hi, David!

Thanks a lot for the help!

It worked.

Only one small thing I noticed: It is a blank space between the last bracket "]", see:

Image

It has some way to let the two brackets together the text prefix?
I'm sorry for my English. Google Translator does a bad job. :D

Hartenheer
Registered User
Posts: 619
Joined: Fri Jan 23, 2015 12:23 pm
Name: Willem Hartman
Contact:

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by Hartenheer » Mon Nov 07, 2016 6:46 pm

I install, activate
Then see nothing

It is difficult to work

User avatar
imkingdavid
Former Team Member
Posts: 2664
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King
Contact:

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by imkingdavid » Tue Nov 08, 2016 7:23 pm

@SalazarAG - It's because of this line: https://github.com/imkingdavid/prefixed ... r.php#L255

You may be able to fix it by changing the code block from 246-256 in that file to this:

Code: Select all

		$prefixes_array = array();
		foreach ($topic_prefixes as $instance)
		{
			$vars = [];
			// A URL to a viewforum view filtered by the prefix
			if ($this->request->variable('f', 0))
			{
				$vars['URL'] = append_sid($this->root_path . 'viewforum.php', ['f' => $this->request->variable('f', 0), 'prefix' => $instance['prefix']]);
			}
			$prefixes_array[] = $instance->parse($block, $vars, $return_parsed) . ' ';
		}
		$return_string = implode(' ', $prefixes_array);
I'll try to remember to fix that in the next commit.
Hartenheer wrote:I install, activate
Then see nothing

It is difficult to work
If you go to the ACP and look under the Posting tab, you don't see anything about Topix Prefixes on the left navigation?
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

Hartenheer
Registered User
Posts: 619
Joined: Fri Jan 23, 2015 12:23 pm
Name: Willem Hartman
Contact:

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by Hartenheer » Tue Nov 08, 2016 7:34 pm

No idea how to run this extension.

User avatar
SalazarAG
Registered User
Posts: 665
Joined: Mon Mar 30, 2015 10:48 am

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by SalazarAG » Wed Nov 09, 2016 12:06 pm

imkingdavid wrote:@SalazarAG - It's because of this line: https://github.com/imkingdavid/prefixed ... r.php#L255

You may be able to fix it by changing the code block from 246-256 in that file to this:

Code: Select all

		$prefixes_array = array();
		foreach ($topic_prefixes as $instance)
		{
			$vars = [];
			// A URL to a viewforum view filtered by the prefix
			if ($this->request->variable('f', 0))
			{
				$vars['URL'] = append_sid($this->root_path . 'viewforum.php', ['f' => $this->request->variable('f', 0), 'prefix' => $instance['prefix']]);
			}
			$prefixes_array[] = $instance->parse($block, $vars, $return_parsed) . ' ';
		}
		$return_string = implode(' ', $prefixes_array);
I'll try to remember to fix that in the next commit.
Hartenheer wrote:I install, activate
Then see nothing

It is difficult to work
If you go to the ACP and look under the Posting tab, you don't see anything about Topix Prefixes on the left navigation?

David worked perfectly. :)

But now something strange has come up kkkkkkkk Now, on topics that do not have prefixes, the brackets appear anyway, see:

Image

This topic has no prefix assigned, so the brackets should not appear.


Hahaha how hard this
I'm sorry for my English. Google Translator does a bad job. :D

User avatar
imkingdavid
Former Team Member
Posts: 2664
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King
Contact:

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by imkingdavid » Wed Nov 09, 2016 3:13 pm

Oh, my mistake.

For this code:
$event['page_title'] = '[' . $this->load_prefixes_topic($event, 'topic_data') . ']' . $event['page_title'];

You should change it to this:

Code: Select all

$topic_prefixes = $this->load_prefixes_topic($event, 'topic_data');
if (!empty($topic_prefixes))
{
    $event['page_title'] = '[' . $topic_prefixes . ']' . $event['page_title'];
}
Let me know if that works.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

Hartenheer
Registered User
Posts: 619
Joined: Fri Jan 23, 2015 12:23 pm
Name: Willem Hartman
Contact:

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by Hartenheer » Wed Nov 09, 2016 3:20 pm

I give up.
Deleted extension on my test forum.
Do not understand how it works

User avatar
SalazarAG
Registered User
Posts: 665
Joined: Mon Mar 30, 2015 10:48 am

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by SalazarAG » Wed Nov 09, 2016 3:51 pm

imkingdavid wrote:Oh, my mistake.

For this code:
$event['page_title'] = '[' . $this->load_prefixes_topic($event, 'topic_data') . ']' . $event['page_title'];

You should change it to this:

Code: Select all

$topic_prefixes = $this->load_prefixes_topic($event, 'topic_data');
if (!empty($topic_prefixes))
{
    $event['page_title'] = '[' . $topic_prefixes . ']' . $event['page_title'];
}
Let me know if that works.
It worked!!!

Very, very, thank you David :)
I'm sorry for my English. Google Translator does a bad job. :D

User avatar
SalazarAG
Registered User
Posts: 665
Joined: Mon Mar 30, 2015 10:48 am

Re: [BETA][3.1] [pre]fixed - Topic Prefixes extension

Post by SalazarAG » Wed Nov 09, 2016 5:19 pm

Hartenheer wrote:I give up.
Deleted extension on my test forum.
Do not understand how it works
It's simple

You install, then in the Posting tab you will find below "Manage Prefixes". You click on it in "New Prefix".

Image

Then you put the prefix, prefix name, id (number that is at the end of the url) of the forum, id of the groups that can use and id of the user that can use.

Image
I'm sorry for my English. Google Translator does a bad job. :D

Locked

Return to “Abandoned Extensions”

Who is online

Users browsing this forum: No registered users and 10 guests