Recent posts

#91
Tips and Tricks / Re: Tip for SMF 2.1: Add 'Star...
Last post by GL700Wing - September 18, 2023, 07:21:17 PM
Quote from: Steve on September 18, 2023, 06:10:48 PMIf I wanted it to not display the time, and still use time as one of it's sorting parameters, would I just remove [time] from Themes/default/MessageIndex.template.php?
Yes - you wouldn't make the second code change to ./Themes/default/MessageIndex.template.php

That said, I've had this implemented on my SMF forum for many years - one of which is more than 20 years old - and I find it useful/interesting to know when topics were started ...
#92
Tips and Tricks / Re: Tip for SMF 2.1: Add 'Star...
Last post by Steve - September 18, 2023, 06:10:48 PM
If I wanted it to not display the time, and still use time as one of it's sorting parameters, would I just remove [time] from Themes/default/MessageIndex.template.php?
#93
SMF Coding Discussion / Re: Modify post "last edit" by...
Last post by MobileCS - September 18, 2023, 03:47:41 PM
I checked out that template file again and it only had ~5 lines that outputs what comes from Sources/Display.php

With that said, I did solve the issue by making the changes below :

Sources/Display.php

// Is this user the message author?
$output['is_message_author'] = $message['id_member'] == $user_info['id'];

$poster_name = strtolower($message['poster_name']);
$modified_name = strtolower($message['modified_name']);

if ( !empty($output['modified']['name']) )
{
if ( $poster_name <> $modified_name )
{
$output['modified']['last_edit_text'] = sprintf($txt['last_edit_by'], $output['modified']['time'], 'Admin');
}
else
{
$output['modified']['last_edit_text'] = sprintf($txt['last_edit_by'], $output['modified']['time'], $output['modified']['name']);
}
}
#94
Español (Spanish) / Re: Error foro
Last post by Diego Andrés - September 18, 2023, 03:00:56 PM
Administración > Log de errores.

Quote from: EL_LARA on September 18, 2023, 01:32:00 PM¡Un error ha ocurrido!
Call to undefined function mysql_free_result()
Probablemente lo cause un mod obsoleto.
#95
SMF Coding Discussion / Re: Modify post "last edit" by...
Last post by Kindred - September 18, 2023, 02:50:12 PM
Hmmm, there was a mid that did something like this


But probably display.Template Php

Not the source file, but the output/template file
#96
Español (Spanish) / Re: Error foro
Last post by EL_LARA - September 18, 2023, 01:32:00 PM
hola 1º muchas gracias por tu respuesta dime donde esta el log de errores ademas no puedo desintalar mod me da otro error

¡Un error ha ocurrido!
Call to undefined function mysql_free_result()
#97
Modifications and Packages / Re: SMF Gallery
Last post by Sudhakar Arjunan - September 18, 2023, 12:51:45 PM
Quote from: Looking on August 12, 2023, 11:26:40 AMThanks for the reply. I edited the converter to work properly so it pulled in all correctly now.
My aeva to smf gallery cracked. Check my forum in signature.
Could you share the updated aeva mod converter for smf gallery.
So I will use to transfer smoothly from aeva gallery to smf gallery please.
#98
SMF Coding Discussion / Modify post "last edit" by nam...
Last post by MobileCS - September 18, 2023, 11:49:55 AM
I'm using SMF 2.1.4

When a post is modified, and it's not being modified by the original poster, I would like the "last edit" name to show "Admin".

How would I go about doing this?

I was originally messing with Sources/Display.php, but only got this far ... I think I'm on the wrong track?

          // Is this user the message author?
if ( !empty($output['modified']['name']) && $message['id_member'] <> $user_info['id'] )
{
$output['modified']['last_edit_text'] = sprintf($txt['last_edit_by'], $output['modified']['time'], 'Admin');
}
else
{
$output['modified']['last_edit_text'] = sprintf($txt['last_edit_by'], $output['modified']['time'], $output['modified']['name']);
}

Does the change perhaps need to be made to the database when the post is actually saved? Force the id_msg_modified to be the id of an admin?

If so, how would I go about doing that?
#99
Modifications and Packages / Re: Bit.ly bbc
Last post by billtidy - September 18, 2023, 11:38:51 AM
Hi,

I know it's been a while since the last post, but is there any chance this could be updated to 2.1.4 please?

I tried to update it myself and got it to install but the hooks would not function properly.

Thank you
#100
SMF 2.1.x Support / Re: Smileys & Attachments opti...
Last post by MartyHunter - September 18, 2023, 11:18:30 AM
Sorry am not sure if I understood your first question. Equivalent content type? It looks like a link to a specific post/reply under a topic (as opposed to just being a link to a topic). Is that what you meant?

.htaccess file contents are:

RewriteEngine On
RewriteBase /
Redirect /index.htm /forum.thehunterslife.com/

# SMF rewrites for vBulletin after vBSEO removed (including forum directory)
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)#[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+&p=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?showthread.php$ https://forum.thehunterslife.com/index.php?topic=%1.msg%2#msg%2 [NE,L,R=301]

RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?showthread.php$ https://forum.thehunterslife.com/index.php?topic=%1.0 [L,R=301]

RewriteCond %{QUERY_STRING} ^f=([0-9]+)&page=[0-9]+(.*)?/?$ [OR]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?forumdisplay.php$ https://forum.thehunterslife.com/index.php?board=%1.0 [L,R=301]

RewriteCond %{QUERY_STRING} ^do=newthread.f=([0-9]+)(.*)?/?$
RewriteRule ^(forums)?/?newthread.php$ https://forum.thehunterslife.com/index.php?board=%1.0 [L,R=301]


# SMF rewrite for cms author
RewriteCond %{QUERY_STRING} ^author/([0-9]+)-.*/?$ [OR]
RewriteCond %{QUERY_STRING} ^r=author/([0-9]+)-.*/?$
RewriteRule ^cms/list.php$ https://forum.thehunterslife.com/index.php?action=profile;u=%1? [L,R=301]

# SMF rewrite for calendar
RewriteRule ^calendar\.php https://forum.thehunterslife.com/index.php?action=calendar? [L,R=301]

# Rewrite all non-existent directories and folders to https://forum.thehunterslife.com/index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ https://forum.thehunterslife.com/index.php? [QSD,L,R=301]

<FilesMatch \.php$>
        SetHandler proxy:fcgi://hqb1ejsk2lyo-php73
</FilesMatch>

Re the error referring to line 55 of that file on server (init.php). Lines 54 and 55 read as follows:

// initialize the data registry
$vbulletin =& new vB_Registry();

thanks for trying to help, really annoying this as people often use these links to specific posts to get related content on complex topics, so they are darn useful!
Advertisement: