Download MOD Topic subject

Support zu den Modifikationen (MODs) von Entwickler OXPUS für das phpBB 3.0.x
Antworten
wull13
Beiträge: 5
Registriert: So 31. Aug 2014, 02:13

Download MOD Topic subject

Beitrag von wull13 »

hi i have been trying to insert the cat name of the download to the post topic and had no luck :cry:

Code: Alles auswählen

	'DL_TOPIC_SUBJECT'	 => '%s - Cat Name Here',
i have tried { DL_CAT_NAME } and did not work the just shows as

Code: Alles auswählen

Download - { DL_CAT_NAME } 
:evil:

any help would be good thanks :mrgreen:
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2660
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: Download MOD Topic subject

Beitrag von oxpus »

Hi,

the topic for downloads will be created in the class dl_topic.
Just add a new token will not work.
You must do the following changes:

Code: Alles auswählen

#
#-----[ OPEN ]-----
#
dl_mod/classes/class_dl_topic.php

#
#-----[ FIND ]-----
#
		$dl_title	= $description;

#
#-----[ AFTER, ADD ]-----
#
		$dl_title	.= ' - ' . $dl_index[$cat_id]['cat_name_nav'];

#
#-----[ FIND ]-----
#
		$topic_title = utf8_normalize_nfc(sprintf($user->lang['DL_TOPIC_SUBJECT'], $dl_title));

#
#-----[ AFTER ADD ]-----
#
		$topic_title = utf8_normalize_nfc($dl_title);

#
#-----[ FIND ]-----
#
		$dl_title	= $description;

#
#-----[ AFTER, ADD ]-----
#
		$dl_title	.= ' - ' . $dl_index[$cat_id]['cat_name_nav'];

#
#-----[ FIND ]-----
#
		$topic_title = utf8_normalize_nfc(sprintf($user->lang['DL_TOPIC_SUBJECT'], $dl_title));

#
#-----[ AFTER ADD ]-----
#
		$topic_title = utf8_normalize_nfc($dl_title);
Regard that the topic title is limited to round 64 characters so long download titles and cat names will be shorten by the forum itself!
Karsten Ude
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
wull13
Beiträge: 5
Registriert: So 31. Aug 2014, 02:13

Re: Download MOD Topic subject

Beitrag von wull13 »

thank you i will get it implamented on my forum and get back to you if i have any problems :)

and thanks for the quick replie :)
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2660
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: Download MOD Topic subject

Beitrag von oxpus »

Mark:
The topic title will only be changed after update or add a download.
The code does not change existing topics until you will update downloads.
Karsten Ude
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
wull13
Beiträge: 5
Registriert: So 31. Aug 2014, 02:13

Re: Download MOD Topic subject

Beitrag von wull13 »

i got it and its all working like magic ;) :) thank you for the help

added the code purged the cache and uploaded and got it so it looks like this now

| DOWNLOAD NAME | CAT |
Darren Styles - Sound without a name - Midis

plus i dont think i will be updating the other downloads lol dont think i could sit and edit 106 titles lol

on a side note you should add that code to the standard installer and make it an option in the mod menu to pick topic title cat name on or off ;) :ugeek:
wull13
Beiträge: 5
Registriert: So 31. Aug 2014, 02:13

Re: Download MOD Topic subject

Beitrag von wull13 »

and just to say thanks for the help and for the great mod i have added oxpus.net to my forums links directoy

Bild
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2660
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: Download MOD Topic subject

Beitrag von oxpus »

Thanks for the feedback.
Yes, this option can be usefull to be implemented as an additional option in the mod.
I'll insert this in the next release.
Karsten Ude
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Antworten