Advertisement:

Author Topic: [MOD][PENDING] Quote to new topic  (Read 1917663 times)

Online emanuele

  • Language Moderator
  • SMF Super Hero
  • *
  • Posts: 14,055
  • Gender: Male
  • THERE'S JUST ME
[MOD][PENDING] Quote to new topic
« on: July 14, 2012, 07:58:05 AM »
Let's give this board a try! :P

This mod has been created following an idea by Groovystar.

From time to time it happens that a post in a topic can be the starting point of a new discussion, but people are too lazy to just quote it and copy the text to a new topic, so this mods adds a new button "quote to new topic" that allows to start a brand new topic with the content of a quote. In the resulting posting page there is also a dropdown that allows to select in which board the new topic should be posted.
But that's not all, of course! :P
Another useful thing in that case is to keep track of both where the topic started and which topics have been generated from a particular post, so the mod adds:
1) to the new topic, a button (next to "reply" etc.) pointing to the original post,
2) to the post that has been quoted to a new topic, a link to every new topic started from there.

As far as I remember that's all (I wrote it a while ago and...well, my memory is not that good :P).

There is also a github repo available:
https://github.com/emanuele45/Quote-to-new-topic

ETA: prefixes and naming are as usual not particularly consistent because I change my mind on the name of my mods several times a minute :P
« Last Edit: August 09, 2013, 08:01:34 AM by Gary »
Do you want to discover what I'm doing? Here it is!



Hai bisogno di supporto in Italiano?

* emanuele dislikes "like" and alike

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

It has been reported to me that I'm being snarky, feel free to be offended by my comments, I'm probably doing it on purpose...or not.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,349
  • Master of BBC Abuse
Re: [MOD] Quote to new topic
« Reply #1 on: July 14, 2012, 08:47:34 AM »
"1) to the new topic, a button (next to "reply" etc.) pointing to the original post,"

So is that only in the OP of the new thread?

ETA: NVM. Just realised you meant the buttonlist. Might be better to put it in the OP.
President for life - Righteous League of GitHub Haterz

 "Seems brilliantly designed to match the intuitions of demented ferrets"

Online emanuele

  • Language Moderator
  • SMF Super Hero
  • *
  • Posts: 14,055
  • Gender: Male
  • THERE'S JUST ME
Re: [MOD] Quote to new topic
« Reply #2 on: July 14, 2012, 09:15:27 AM »
Yes, that was one of the ideas...in the end I put it into the buttonlist in order to avoid another theme edit.
Additionally (in theory) it should not be *so* important because in the OP there should be the quote from the original post that should come with a link to the post...a lot of "should"... lol
Do you want to discover what I'm doing? Here it is!



Hai bisogno di supporto in Italiano?

* emanuele dislikes "like" and alike

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

It has been reported to me that I'm being snarky, feel free to be offended by my comments, I'm probably doing it on purpose...or not.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,349
  • Master of BBC Abuse
Re: [MOD] Quote to new topic
« Reply #3 on: July 14, 2012, 09:25:45 AM »
Fair enough. I was just thinking that it's the sort of thing that doesn't really need another button cluttering up the list. Maybe the link in the quoteheader is enough.
President for life - Righteous League of GitHub Haterz

 "Seems brilliantly designed to match the intuitions of demented ferrets"

Online emanuele

  • Language Moderator
  • SMF Super Hero
  • *
  • Posts: 14,055
  • Gender: Male
  • THERE'S JUST ME
Re: [MOD] Quote to new topic
« Reply #4 on: July 14, 2012, 10:01:16 AM »
Yep, I admit I didn't like the new button me too...(also because AFAIR the text is long)
I'll check if I can find some other spot...mmm...I think I found it, but I have to test it.
Do you want to discover what I'm doing? Here it is!



Hai bisogno di supporto in Italiano?

* emanuele dislikes "like" and alike

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

It has been reported to me that I'm being snarky, feel free to be offended by my comments, I'm probably doing it on purpose...or not.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,349
  • Master of BBC Abuse
Re: [MOD] Quote to new topic
« Reply #5 on: July 14, 2012, 10:25:25 AM »
Hey idea. Might be a dumb one but: you could have a custom quoteheader in the OP. That way you are only playing with Sources.
President for life - Righteous League of GitHub Haterz

 "Seems brilliantly designed to match the intuitions of demented ferrets"

Online emanuele

  • Language Moderator
  • SMF Super Hero
  • *
  • Posts: 14,055
  • Gender: Male
  • THERE'S JUST ME
Re: [MOD] Quote to new topic
« Reply #6 on: July 14, 2012, 11:54:05 AM »
I'm a bit dumb...well, a lot...I just realized I forgot to attach the package... lol

What I tried now (and Ant will beat me because I put some markup into a source file...but it's such a tiny mod I didn't want to create a template file for that) is to use the space provided by the custom profile fields!

Custom profile fields provide a couple of places that can be used to insert anything into the display page, and since I was already editing Display.php exactly in prepareDisplayContext (the function that retrieves the data for each post), I changed a bit the way the mod works (and if I'll remember to send a pull request it will be even easier to do in 2.1! :P) and now the informations (original topic and originated topics) are displayed above the signature.
Technically it could even be possible (and easy to do) to give the admins an option to select where display each info in any of the three positions available for custom profile fields: "standard", "with icons", "above signature".

Hey idea. Might be a dumb one but: you could have a custom quoteheader in the OP. That way you are only playing with Sources.
The original design was to add a line of text into the post with the informations about the original topic...well, it could even be added to the body itself while processing it, it's not a bad idea that too.
Do you want to discover what I'm doing? Here it is!



Hai bisogno di supporto in Italiano?

* emanuele dislikes "like" and alike

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

It has been reported to me that I'm being snarky, feel free to be offended by my comments, I'm probably doing it on purpose...or not.

Offline FrizzleFried

  • Drama-Monger
  • Full Member
  • ***
  • Posts: 665
Re: [MOD] Quote to new topic
« Reply #7 on: July 14, 2012, 12:01:55 PM »
Awesome Idea!

The problem i see is that I already have a problem with long (70 character plus) titles running in to the buttons on the right pushing down the title and pushing the date off the screen...  If there was a way to implement the mod using a sub menu of QUOTE... click QUOTE and have a couple options?  That would rock!


Online emanuele

  • Language Moderator
  • SMF Super Hero
  • *
  • Posts: 14,055
  • Gender: Male
  • THERE'S JUST ME
Re: [MOD] Quote to new topic
« Reply #8 on: July 14, 2012, 12:35:55 PM »
Yes, I can understand: multiquote and this one and the length of the buttons is impossible to handle...and if you have post approval on it is even worse.

At the moment I have no idea how to create a drop down there...theming is not my field *at all*...

ETA: thinking a bit more, the "quote to blabla" button is nice, but the option could even be in the post form...a bit more tricky, but probably possible. For the future though.
Do you want to discover what I'm doing? Here it is!



Hai bisogno di supporto in Italiano?

* emanuele dislikes "like" and alike

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

It has been reported to me that I'm being snarky, feel free to be offended by my comments, I'm probably doing it on purpose...or not.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,349
  • Master of BBC Abuse
Re: [MOD] Quote to new topic
« Reply #9 on: July 14, 2012, 05:51:11 PM »
Custom profile fields provide a couple of places that can be used to insert anything into the display page, and since I was already editing Display.php exactly in prepareDisplayContext (the function that retrieves the data for each post), I changed a bit the way the mod works (and if I'll remember to send a pull request it will be even easier to do in 2.1! :P) and now the informations (original topic and originated topics) are displayed above the signature.

Only in the OP, right? Not in every post in the new thread.


Quote
The original design was to add a line of text into the post with the informations about the original topic...well, it could even be added to the body itself while processing it, it's not a bad idea that too.

Yeah OP quote body would be an excellent place for it.
President for life - Righteous League of GitHub Haterz

 "Seems brilliantly designed to match the intuitions of demented ferrets"

Online emanuele

  • Language Moderator
  • SMF Super Hero
  • *
  • Posts: 14,055
  • Gender: Male
  • THERE'S JUST ME
Re: [MOD] Quote to new topic
« Reply #10 on: July 15, 2012, 03:11:59 AM »
Only in the OP, right? Not in every post in the new thread.
Yep, unless there is a bug! :P
Do you want to discover what I'm doing? Here it is!



Hai bisogno di supporto in Italiano?

* emanuele dislikes "like" and alike

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

It has been reported to me that I'm being snarky, feel free to be offended by my comments, I'm probably doing it on purpose...or not.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,349
  • Master of BBC Abuse
Re: [MOD] Quote to new topic
« Reply #11 on: July 15, 2012, 03:37:48 AM »
Ok, so in every third post, more or less, except on Sundays. :P
President for life - Righteous League of GitHub Haterz

 "Seems brilliantly designed to match the intuitions of demented ferrets"

Offline 4Kstore

  • Language Moderator
  • SMF Hero
  • *
  • Posts: 4,097
  • Gender: Male
    • agustintari on Facebook
    • @agustintarifa on Twitter
    • SSIMPLE TEAM PAGE
Re: [MOD] Quote to new topic
« Reply #12 on: July 15, 2012, 05:39:44 PM »
Nice mod, i take a look and work perfect :)

Here is the spanish translation
Code: [Select]
<file name="$languagedir/Modifications.spanish_latinphp">
<operation>
<search position="end" />
<add><![CDATA[
$txt['qas_topicOriginated_from'] = 'Mensaje Original';
$txt['qas_topicGenerates'] = 'Este mensaje comenzó la nueva discusión:';
$txt['qas_quote_new'] = 'Citar en un nuevo tema';
]]></add>
</operation>
</file>

Bye
NUEVOS MODS!!!
Gana dinero con tu foro y el nuevo mod: Pay per post!

Mi Web: SMFSimple.com

Online emanuele

  • Language Moderator
  • SMF Super Hero
  • *
  • Posts: 14,055
  • Gender: Male
  • THERE'S JUST ME
Re: [MOD] Quote to new topic
« Reply #13 on: July 16, 2012, 08:37:10 AM »
Thanks 4Kstore for the translation, I'll add it...maybe I should add the Italian too... O:)

ehm...put "perfect" in a sentence related to something I did is a bit risky. :P
Do you want to discover what I'm doing? Here it is!



Hai bisogno di supporto in Italiano?

* emanuele dislikes "like" and alike

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

It has been reported to me that I'm being snarky, feel free to be offended by my comments, I'm probably doing it on purpose...or not.

Offline FrizzleFried

  • Drama-Monger
  • Full Member
  • ***
  • Posts: 665
Re: [MOD] Quote to new topic
« Reply #14 on: July 18, 2012, 09:20:55 AM »
As I am sure you folks know... this mod works.  :)  I figured I better post that it's causing no problems on my test forum what so ever... again,  my only concern is that combined with other mods the number of buttons could get to a point where it interferes with post titles.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,349
  • Master of BBC Abuse
Re: [MOD] Quote to new topic
« Reply #15 on: July 18, 2012, 04:51:59 PM »
That's only because SMF has the buttons is a really stupid place, and it's hard to get them to change their ways. :D
President for life - Righteous League of GitHub Haterz

 "Seems brilliantly designed to match the intuitions of demented ferrets"

Online emanuele

  • Language Moderator
  • SMF Super Hero
  • *
  • Posts: 14,055
  • Gender: Male
  • THERE'S JUST ME
Re: [MOD] Quote to new topic
« Reply #16 on: July 19, 2012, 04:37:31 AM »
* emanuele wonders why this strip of buttons isn't an array and doesn't have a template like most of the others...
Do you want to discover what I'm doing? Here it is!



Hai bisogno di supporto in Italiano?

* emanuele dislikes "like" and alike

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

It has been reported to me that I'm being snarky, feel free to be offended by my comments, I'm probably doing it on purpose...or not.

Offline FrizzleFried

  • Drama-Monger
  • Full Member
  • ***
  • Posts: 665
Re: [MOD] Quote to new topic
« Reply #17 on: July 19, 2012, 12:16:24 PM »
I poked around but didn't see an easy way to make QUOTE have a drop-down menu.  That would solve the issue...

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,349
  • Master of BBC Abuse
Re: [MOD] Quote to new topic
« Reply #18 on: July 19, 2012, 05:17:17 PM »
@Ema: yeah that would kinda make sense. You could shove it in one of the existing Generic BatPoo.templates. Just don't throw it in Sources. :P

That means the INDIVIDUAL buttons displayed AND the order in which they display AND the position in which they displayed and even which list or sub-list they are displayed in MUST stay accessible to themers, goddammit. No pre-cooking them and dropping them on themers from a great height like vulture turds. Kthnx. :)
President for life - Righteous League of GitHub Haterz

 "Seems brilliantly designed to match the intuitions of demented ferrets"

Offline Arantor

  • SMF Friend
  • SMF Legend
  • *
  • Posts: 58,417
Re: [MOD] Quote to new topic
« Reply #19 on: July 19, 2012, 05:24:22 PM »
I've never heard of the generic templates being described as bat poo, but it does seem oddly appropriate.