Advertisement:

Author Topic: BBC [you] Tag  (Read 36257 times)

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,167
  • Gender: Male
    • i30 Owners Club
Re: BBC [you] tag
« Reply #60 on: August 19, 2012, 09:19:39 AM »

any chance you could help me edit the code so it shows a @ or some other symbol before the username  ;)

Code: [Select]
// BBC [you] tag. ;)
$codes[] = array(
'tag' => 'you',
'type' => 'closed',
'content' => (!$context['user']['is_guest'] ? '@' . $context['user']['name'] : (!empty($txt[28]) ? $txt[28] : $txt['guest'])),
);

Offline thechronic2001

  • Semi-Newbie
  • *
  • Posts: 67
Re: BBC [you] tag
« Reply #61 on: August 19, 2012, 12:52:30 PM »
thanks buddy, it worked a treat  ;)

Offline mgrmgr

  • Semi-Newbie
  • *
  • Posts: 92
  • Gender: Male
Re: BBC [you] tag
« Reply #62 on: August 31, 2012, 02:16:51 AM »
I've got a problem now. I installed it in SMF 1.16 and it worked also in signatures, now in SMF 2.0.2 not working in signatures any longer :(

BTW: I'd love a group permission for using it, I'd prefer to let only staff use it to avoid embarrassment/annoyed users.

Offline mgrmgr

  • Semi-Newbie
  • *
  • Posts: 92
  • Gender: Male
Re: BBC [you] tag
« Reply #63 on: October 12, 2012, 01:30:31 PM »
Well - I found the solution myself and moved the 'you' array before the integration hook call.

The permission for membergroups is solved now with the help of custom-permissions and a small tweak in the replacement line.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,647
    • StoryBB/StoryBB on GitHub
Re: BBC [you] tag
« Reply #64 on: January 07, 2015, 04:21:09 PM »
Might I suggest the content of the tag be set to:
Code: [Select]
'content' => empty($context['user']['is_guest']) && !empty($context['user']['name']) ? $context['user']['name'] : (!empty($txt[28]) ? $txt[28] : (!empty($txt['guest']) ? $txt['guest'] : 'Guest')),
Reason I say this is because this was being invoked on pages where $context['user'] wasn't being defined (action=dlattach) and in those cases the $txt strings might not be loaded either, hence a fallback for that too that doesn't rely on language files. (I think this would be allowed under the 'no hardcoded text' rule ;D)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Diego Andrés

  • Customizer
  • SMF Hero
  • *
  • Posts: 3,348
  • Gender: Male
    • DiegoSetroc on GitHub
    • @bihgetter on Twitter
    • SMF Tricks - Free & Premium Themes
Re: BBC [you] tag
« Reply #65 on: January 07, 2015, 07:21:04 PM »
Thanks, I'll take the suggestion and update the mod.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Offline sangham.net

  • Full Member
  • ***
  • Posts: 497
  • Gender: Male
Re: BBC [you] tag
« Reply #66 on: May 29, 2015, 07:19:18 AM »
Thanks valued Diego Andrés for this nice mod and dear Mr. Arantor for the additional code. Works fine!

metta & mudita
Samana Johann

Offline Diego Andrés

  • Customizer
  • SMF Hero
  • *
  • Posts: 3,348
  • Gender: Male
    • DiegoSetroc on GitHub
    • @bihgetter on Twitter
    • SMF Tricks - Free & Premium Themes
Re: BBC [you] tag
« Reply #67 on: July 16, 2015, 12:10:51 PM »
Mod updated, now is using hooks

SMF Tricks - Free & Premium Responsive Themes for SMF.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,167
  • Gender: Male
    • i30 Owners Club
Re: BBC [you] tag
« Reply #68 on: July 16, 2015, 01:12:08 PM »
It's hiding ;)


Offline Diego Andrés

  • Customizer
  • SMF Hero
  • *
  • Posts: 3,348
  • Gender: Male
    • DiegoSetroc on GitHub
    • @bihgetter on Twitter
    • SMF Tricks - Free & Premium Themes
Re: BBC [you] tag
« Reply #69 on: July 16, 2015, 01:16:55 PM »
Our lovely modsite  ;D
Fixed  :P

SMF Tricks - Free & Premium Responsive Themes for SMF.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,167
  • Gender: Male
    • i30 Owners Club
Re: BBC [you] Tag
« Reply #70 on: July 16, 2015, 01:33:42 PM »
Nice one. If only it would apply the code to topic titles...    *whistles*

Offline landyvlad

  • Sr. Member
  • ****
  • Posts: 862
  • Gender: Male
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: BBC [you] Tag
« Reply #71 on: March 16, 2017, 02:43:23 AM »
Yes, before iinstal this - does it work in topic titles yet?
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."

No hack nor blackhats, just persistent asshats.

Offline shadav

  • Jr. Member
  • **
  • Posts: 208
  • Gender: Female
Re: BBC [you] Tag
« Reply #72 on: August 30, 2019, 04:36:42 PM »
how to get this to show up in the bbcode list for 2.0.15?
I tried in subs-editor.php
Code: [Select]
array(
'image' => 'you',
'code' => 'you',
'before' => '[you]',
'description' => $txt['you']
),
but obviously that didn't work  :laugh:

Offline Diego Andrés

  • Customizer
  • SMF Hero
  • *
  • Posts: 3,348
  • Gender: Male
    • DiegoSetroc on GitHub
    • @bihgetter on Twitter
    • SMF Tricks - Free & Premium Themes
Re: BBC [you] Tag
« Reply #73 on: August 31, 2019, 12:17:49 PM »
You need to add $txt['you'] somewhere.
Post.english.php or index.english.php


And also add a bbc image to images/bbc/you.gif

SMF Tricks - Free & Premium Responsive Themes for SMF.

Offline Herman's Mixen

  • SMF Hero
  • ******
  • Posts: 7,252
    • HermanMixen on Facebook
    • @Hermans_Mixen on Twitter
    • Herman's Mixen
Re: BBC [you] Tag
« Reply #74 on: August 31, 2019, 04:09:26 PM »
Modifaction.language.php  ;)
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

Offline shadav

  • Jr. Member
  • **
  • Posts: 208
  • Gender: Female
Re: BBC [you] Tag
« Reply #75 on: September 01, 2019, 12:21:50 AM »
thank you both....don't know what's wrong now lol
so in subs-editor.php I added
Code: [Select]
array(
'image' => 'you',
'code' => 'you',
'before' => '[you]',
'description' => $txt['bbc_you']
),
i changed the txt just in case

then in modifications.english.php and also in post.english.php i added
Code: [Select]
$txt['bbc_you'] = 'Insert name of person reading';I tried either or and both but still same issue, it's showing up like this


[edit] nevermind  :laugh: I forgot to upload the image  ::)
thank you it's working now
[edit again] i'll attach the image if anyone wants to use it
« Last Edit: September 01, 2019, 12:32:07 AM by shadav »