Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Topic started by: mynd on October 14, 2007, 08:59:43 AM

Title: a few packages need fixing please
Post by: mynd on October 14, 2007, 08:59:43 AM
Hello there,

I was wondering if anyone could get the creators to update their package so that they work in 1.1.4.  Here are the ones that won't install from the package manager

PM On Registration
SMF Ads
Remove Post Modified Time      1.0 - installs but does not work for default theme, no link is generated to remove modification line.

Thanks so much to the people who make these things.  I just want to know if there will be any fixes soon to get these working.


Title: Re: a few packages need fixing please
Post by: Oldiesmann on October 15, 2007, 10:36:40 AM
You will need to contact the mod authors yourself - we can't really do anything more than what you could do.
Title: Re: a few packages need fixing please
Post by: rsw686 on October 15, 2007, 12:03:20 PM
Quote from: mynd on October 14, 2007, 08:59:43 AM
Remove Post Modified Time      1.0 - installs but does not work for default theme, no link is generated to remove modification line.

I wrote this package and it works fine. I have tested it on 1.1.3 and 1.1.4 clean installs. If you look at the mod topic others are using it without issue.

Couple of things to check. First you need to be logged in with admin privileges to see the link. If your doing that I would recommend you right click on the page thats not showing the "Remove this line" link and view the source. Look for the last edit text and see if you see the link next to it. It the link is just missing the text between <a  href="YOURSITE/index.php?action=removemodified;msg=1;topic=1.0;sesc=SESID"> and </a> then make sure your Modifications.english.php file contains the below line.

$txt['remove_modified'] = 'Remove this line';

If you do not see the link then you need to check Themes/default/Display.template.php to make sure it has the following


// Show "« Last Edit: Time by Person »" if this post was edited.
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
« <i>', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], '</i> »';

// Allow admin to remove last edit time
if($context['user']['is_admin'] && !empty($message['modified']['name']))
echo '
<a href="', $scripturl, '?action=removemodified;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $txt['remove_modified'], '</a>';
Title: Re: a few packages need fixing please
Post by: mynd on October 16, 2007, 12:08:10 PM
Hello there and this reply is in regard to Remove Post Modified Time

I checked the source of my page and here is the code that was there

<td valign="bottom" class="smalltext" id="modified_2">
&#171; <i>Last Edit: September 26, 2007, 10:57:36 AM by Mynd Pollution</i> &#187;
<a href="http://myndpollution.com/forums/index.php?action=removemodified;msg=2;topic=2.0;sesc=f8bfa143a4eff156bfa939305e087fc2"></a>
</td>


I then checked according to you my Modifications.english.php

which has this in it

<?php
// Version: 1.1; Modifications
$txt['remove_modified'] = 'Remove this line';
?>


I then checked display.template.php for the code you specified and found this

// Show "« Last Edit: Time by Person »" if this post was edited.
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
&#171; <i>', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], '</i> &#187;';

// Allow admin to remove last edit time
if($context['user']['is_admin'] && !empty($message['modified']['name']))
echo '
<a href="', $scripturl, '?action=removemodified;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $txt['remove_modified'], '</a>';


It still does not work, and I am logging in as admin and there is no option for me to delete the last post.  I appreciate your help and suggestions.  Everything is as you said.


Title: Re: a few packages need fixing please
Post by: rsw686 on October 16, 2007, 12:56:37 PM
The code is working, it's just not grabbing the text string from the modifications.english.php file. Did you create or convert your forum to UTF-8? If so you will need to copy the Modifications.english.php to Modifications.english-utf8.php
Title: Re: a few packages need fixing please
Post by: mynd on October 16, 2007, 03:43:26 PM
ok.... thank you.. modification to the Modifications.english-utf8.php worked.. so that is resolved.

Thanks again, now for the other 2! :)
Title: Re: a few packages need fixing please
Post by: ssnickerer on October 17, 2007, 10:08:52 AM
Quote from: rsw686 on October 15, 2007, 12:03:20 PM
Quote from: mynd on October 14, 2007, 08:59:43 AM
Remove Post Modified Time      1.0 - installs but does not work for default theme, no link is generated to remove modification line.

I wrote this package and it works fine. I have tested it on 1.1.3 and 1.1.4 clean installs. If you look at the mod topic others are using it without issue.

Couple of things to check. First you need to be logged in with admin privileges to see the link. If your doing that I would recommend you right click on the page thats not showing the "Remove this line" link and view the source. Look for the last edit text and see if you see the link next to it. It the link is just missing the text between <a  href="YOURSITE/index.php?action=removemodified;msg=1;topic=1.0;sesc=SESID"> and </a> then make sure your Modifications.english.php file contains the below line.

$txt['remove_modified'] = 'Remove this line';

If you do not see the link then you need to check Themes/default/Display.template.php to make sure it has the following


// Show "« Last Edit: Time by Person »" if this post was edited.
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
« <i>', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], '</i> »';

// Allow admin to remove last edit time
if($context['user']['is_admin'] && !empty($message['modified']['name']))
echo '
<a href="', $scripturl, '?action=removemodified;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $txt['remove_modified'], '</a>';


Bingo - thanks for the quick fix, rsw868! And thanks for writing the mod! Nothing was in between the link tags, and it was because I had applied the text settings to Modifications.english-utf8.php instead of Modifications.english.php.

Thanks again!
Title: Re: a few packages need fixing please
Post by: STS on November 18, 2007, 10:14:29 AM
Quote from: rsw686 on October 15, 2007, 12:03:20 PM
...make sure your Modifications.english.php file contains the below line.

$txt['remove_modified'] = 'Remove this line';


This was the key for me. Just inserting the line

$txt['remove_modified'] = 'X';

in the Modifications.english.php file

(I changed "Remove this line" to an "X" since I'm the only one who sees it anyway).

Title: Re: a few packages need fixing please
Post by: Patchouli on January 05, 2008, 06:15:15 PM
All I had to do to make the mod work for me was adding that line

$txt['remove_modified'] = 'Remove this line';

to my Modifications.dutch-utf8.php and Modifications.dutch.php.

Works perfect now!

Thanks so much,

Patchouli. :)
Title: Re: a few packages need fixing please
Post by: dxyy on January 09, 2008, 09:11:22 AM
mynd, I have the PM on registration and the ad management (http://custom.simplemachines.org/mods/index.php?mod=255) mods installed. I'm not sure if SMF ads is something different from what I have though.

Anyway, both of those mods were only reinstalled after I upgraded to 1.1.4

I think you need to unzip/unpack all the files, then look for the package-info file.
Not sure if that will help you, but maybe at least will point you in the right direction. :)