Advertisement:

Author Topic: Share this topic SMF Mod  (Read 40589 times)

Offline Branko.

  • SMF Hero
  • ******
  • Posts: 3,330
  • Gender: Male
  • U zemlji slijepih, jednooki je kralj
    • SATForum
Re: Share this topic SMF Mod
« Reply #60 on: August 29, 2014, 04:49:24 AM »
Sharethis::ShareThisWho(), is part of Share This by Suki...  :)
Code: [Select]
<file name="$sourcedir/Who.php">
<operation>
<search position="replace"><![CDATA[ 'mods' => array(]]></search>
<add><![CDATA[ 'mods' => array(
Sharethis::ShareThisWho(),]]></add>
</operation>
</file>

$txt['subjectcopy'] is part of ChangeAllSubjects by runic
Code: [Select]
/file>
<file name="$sourcedir/Who.php">
<operation>
<search position="replace" whitespace="loose"><![CDATA[ 'mods' => array(]]></search>
<add><![CDATA[ 'mods' => array( $txt['subjectcopy'],]]></add>
</operation>
</file>

All is related with copyright
Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Share this topic SMF Mod
« Reply #61 on: August 29, 2014, 09:36:44 AM »
That's where I was going :P I just didn't recognise which mod had subjectcopy in it...
No good deed goes unpunished
All helpful urges should be circumvented

Offline Kimmie

  • SMF Hero
  • ******
  • Posts: 1,590
Re: Share this topic SMF Mod
« Reply #62 on: August 31, 2014, 01:28:39 PM »
Ok so the error is coming from the Change All Subjects mod? I had that one, and decided to uninstall it and go with the "Edit All Message Titles" mod. It looks like the uninstall left this code even though I didn't get any test fails when I uninstalled it. I should just be able to remove this line right?

 $txt['subjectcopy']


Asking before hand as I don't want to mess anything up. This is the parse code for it. I need to also remove the , at the end right?


Offline Branko.

  • SMF Hero
  • ******
  • Posts: 3,330
  • Gender: Male
  • U zemlji slijepih, jednooki je kralj
    • SATForum
Re: Share this topic SMF Mod
« Reply #63 on: August 31, 2014, 05:25:18 PM »
The reverse action
Find
Code: [Select]
'mods' => array( $txt['subjectcopy'],
replace with
Code: [Select]
'mods' => array(
Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

Offline Kimmie

  • SMF Hero
  • ******
  • Posts: 1,590
Re: Share this topic SMF Mod
« Reply #64 on: August 31, 2014, 09:12:35 PM »
The reverse action
Find
Code: [Select]
'mods' => array( $txt['subjectcopy'],
replace with
Code: [Select]
'mods' => array(


That doesn't work anymore because there are two other mod codes in between that. I just wasn't sure about the comma at the end


Code: [Select]
*/
'mods' => array(
SaShop_Who(),
Sharethis::ShareThisWho(), $txt['subjectcopy'],
),

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Share this topic SMF Mod
« Reply #65 on: August 31, 2014, 09:20:58 PM »
The comma at the end is fine, you just need to ensure you don't have extra commas with nothing in them.

This would be bad:
Code: [Select]
*/
'mods' => array(
SaShop_Who(),
Sharethis::ShareThisWho(), ,
),

But if you're removing the mod, this would be correct:
Code: [Select]
*/
'mods' => array(
SaShop_Who(),
Sharethis::ShareThisWho(),
),
No good deed goes unpunished
All helpful urges should be circumvented

Offline Kimmie

  • SMF Hero
  • ******
  • Posts: 1,590
Re: Share this topic SMF Mod
« Reply #66 on: September 01, 2014, 01:07:35 PM »
Thanks Arantor. That is what I needed to know :)