Custom Post Title

Started by SMFHacks.com Team, July 02, 2009, 02:53:11 PM

Previous topic - Next topic

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

FatalFemale

Hey I'm doing a conversion for 1.1.11... so I was looking at your code through PHPDesigner7.  This portion of the code is getting a parse error..

if (!empty($modSettings['custom_post_title_pcEnable']))
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />';
}
echo '
                <br />';

elseif (!empty($modSettings['custom_post_title_enable']) && $message['member']['posts'] <= $modSettings['custom_posts_lessNumber'])
echo '
                ', $modSettings['custom_post_titleMore'], '<br />
{
if (!empty($modSettings['custom_post_title_pcEnable']))
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />';
}
echo '
                <br />';

// Show how many posts they have made.
else
        echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
<br />';
}
// End Custom Post Titles


Error: syntax error unexpected T_STRING expecting ' ' or ";"

Just thought you should be aware :)

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Joker™

can we convert it to custom title for Private groups also...

actually in my forum all ranks are allotted by admins to users they r not post based...

So if possible can we have for those groups also ...
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

FatalFemale

Thanks for the fix on the mod it works wonders now!  I have a question for you though, how can we change it so that we can add multiple tiers of Custom Tiles to go along with the Post Count, i.e. (yes, I know this is a lot on a site for posts)

Unknown ---- Under 500 Posts
Tolerated ----- 501 Posts - 1000 Posts
Unremarkable ----- 1001 - 2001...  basically about 20 tiers

I'm sure I could sit down and figure it out myself but your smart enough to figure out what you did wrong and I couldn't, plus I'm sick >_<  I'm sure others might think it would be a good feature to add.. and if anything I can supply you with at least 20 tiers :P

gbsothere

#25
vbgamer45, if you happen to pass this way and don't mind a few questions....    :)

I'm having to reinstall this on SMF 1.1.11, default and I have three questions:

1.)  Well, this isn't really a question but, although 1.1.11 is listed on the mod, you have to use 1.1.9 in the pull-down, or you'll get a "not compatible" message.

2.)  The instructions for ModSettings.php are:

Find:
// This is like debugging sorta.
array('check', 'timeLoadPageEnable'),
array('check', 'disableHostnameLookup'),
'',


Replace with:


// Custom Post Titles
array('check', 'custom_post_title_enable'),
array('text', 'custom_post_titleMore'),
array('int', 'custom_posts_moreNumber'),
array('text', 'custom_post_titleLess'),
array('int', 'custom_posts_lessNumber'),
array('check', 'custom_post_title_pcEnable'),
'',



Do we really want to replace, rather than "add after"?  This seems to get rid of the ability to disable Host Name Lookup.

3.)  I'm getting this error:

Undefined index: custom_posts_lessNumber
File: /var/www/vhosts/mywebsite.com/httpdocs/smf/Themes/default/Display.template.php
Line: 344


and line 344 is:

         elseif (!empty($modSettings['custom_post_title_enable']) && $message['member']['posts'] <= $modSettings['custom_posts_lessNumber'])


Adding $custom_posts_lessNumber to the globals didn't sort it.   :-\



EDIT:   Okay, I've figured out what's causing it.  There's no glitchy edit; it's just this:

   Set a custom post title for less than "x" posts.
   
   Number of posts a member must reach to lose custom post title.


If you don't want every member to have a custom title, and you leave "set a custom title for less than x posts" blank, then you still must fill in something for the number of posts a member must reach to lose custom post title.  My test board will accept a value of 0, but my active board, sadly, won't.  It will only accept 1.   Anyway.....   putting a number in that field made the error go away.




Edit, again:   Wait I'm not through posting, yet!   :D


Any way to make this show up on Personal Messages?


My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

vbgamer45

Thanks gbsothere I believe I have fixed all the above errors for SMF 1.1.x posted a new version
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

gbsothere

#27
Quote from: vbgamer45 on July 14, 2010, 12:47:52 PM
Thanks gbsothere I believe I have fixed all the above errors for SMF 1.1.x posted a new version



Thanks!  I'll check it out!   ;)

Can I ask, though....   could edits similar to Display.template.php be done to PersonalMessage.template.php to make the custom title visible there, as well, or would that end up involving other Source files?

EDIT:  Actually, it can, vbgamer45, and it works, beautifully, but I need to mention...  the template edits for the 1.1.9 version work.  The ones on the 1.1.11 pulldown are causing a template parse error.




Actually this is getting rid of the template parse error:

// Start Custom Post Titles
     
      if (!empty($modSettings['custom_post_title_enable']) && $message['member']['posts'] >= $modSettings['custom_posts_moreNumber'])
      {
        echo '
                ', $modSettings['custom_post_titleMore'], '<br />';

if (!empty($modSettings['custom_post_title_pcEnable']))
{
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />';
}
echo '
                <br />';
      }
elseif (!empty($modSettings['custom_post_title_enable']) && $message['member']['posts'] <= $modSettings['custom_posts_lessNumber'])
{
echo '
                ', $modSettings['custom_post_titleMore'], '<br />';

if (!empty($modSettings['custom_post_title_pcEnable']))
{
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />';
}
echo '
                <br />';
      }
// Show how many posts they have made.
else
        echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
<br />';

// End Custom Post Titles
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

T3CHN0

Hello

I like this mod very much and it's the closest one to what I am looking for.

Can this mod be edited so members can pick a small custom image to go behind there custom name?
I have a car web site I want members to be able to pick a custom number plate name and number plate image,
so a custom image would need to be in a list of images I added so members can click on what image from a selection they want to use
cheers

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: