Customizing SMF > Modifications and Packages

Change All Subjects

<< < (21/25) > >>

live627:
Try this one http://dev.live627.com/index.php?action=mods#65 Do the errors go away?

Max22:

--- Quote from: live627 on June 18, 2011, 04:35:05 PM ---Try this one http://dev.live627.com/index.php?action=mods#65 Do the errors go away?

--- End quote ---

I can't download it, also as registered user I receive this error:
The download you are looking for is either not existing or is off limits to you.

EDIT: I downloaded Change_All_Subjects_1_1_3.zip from your server, the install11.xml is equal to my version.  :-\

HunterP:

--- Quote from: Max22 on June 18, 2011, 04:31:48 PM ---Now I'm having also these your "old" issues in the error log:
http://www.simplemachines.org/community/index.php?topic=234633.msg2966862#msg2966862
http://www.simplemachines.org/community/index.php?topic=234633.msg2966870#msg2966870

Have you solved them?

--- End quote ---

Can't recall anymore. At that time I was still using 1.1.13 and upgraded to SMF 2.0 (first RC5) a few months ago.

Also, I modded this mod for my own needs, on my forum it allways changes all subjects when the first posting is being modified.

Max22:

--- Quote from: HunterP on June 18, 2011, 04:55:20 PM ---
--- Quote from: Max22 on June 18, 2011, 04:31:48 PM ---Now I'm having also these your "old" issues in the error log:
http://www.simplemachines.org/community/index.php?topic=234633.msg2966862#msg2966862
http://www.simplemachines.org/community/index.php?topic=234633.msg2966870#msg2966870

Have you solved them?

--- End quote ---

I modded this mod for my own needs, on my forum it allways changes all subjects when the first posting is being modified.

--- End quote ---

Would you like to share your custom mod here?

HunterP:

--- Quote from: Max22 on June 18, 2011, 05:09:04 PM ---Would you like to share your custom mod here?

--- End quote ---

For 1.1.x that will be :


--- Code: --- <file name="$sourcedir/Subs-Post.php">
<operation>
<search position="after"><![CDATA[ // Change the post.
db_query("
UPDATE {$db_prefix}messages]]></search>
<add><![CDATA[ // Check if this is the first message in the topic
$request = mysql_query("SELECT ID_FIRST_MSG FROM {$db_prefix}topics
WHERE ID_TOPIC=$topicOptions[id]") or database_error(__FILE__, __LINE__);
$row = mysql_fetch_array($request);
mysql_free_result($request);

// Change all subjects if subject set and if first message
if (isset($msgOptions['subject']) && ($row['ID_FIRST_MSG'] == $msgOptions['id']))
{
//Add the prefix and do it.
db_query("
UPDATE {$db_prefix}messages
SET subject = '$txt[response_prefix]$msgOptions[subject]'
WHERE ID_TOPIC = $topicOptions[id]", __FILE__, __LINE__);
}

]]></add>
</operation>
<operation>
<search position="before"><![CDATA[global $db_prefix, $user_info, $ID_MEMBER, $modSettings]]></search>
<add><![CDATA[, $txt]]></add>
</operation>
</file>
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version