News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

HELP WITH THIS!

Started by Mr. Pirate, October 10, 2009, 05:35:37 PM

Previous topic - Next topic

Mr. Pirate

#20
yeah i want it to show the code tag when the log in or register but not if they are guests
if you can make a mod for this that would be great so we can turn it on and off.

Mr. Pirate


Arantor

Please do not bump multiple times - especially inside 24 hours.

This is not a simple piece of code to change as it has other effects as well within Subs.php. And as I said I'd reply to this once I had an answer.

Mr. Pirate

oh ok im a noob in SMF community sorry for bumping so much.

Mr. Pirate

Bump!
Can someone help me.

Arantor

I'll post when I've figured it out, not before. I won't get it figured any quicker with it being bumped or not.

sangwe11

Quote from: Arantor on October 24, 2009, 05:34:10 PM
I'll post when I've figured it out, not before. I won't get it figured any quicker with it being bumped or not.

Can you not just modify the code bbc code, to check if either the first 4 characters = www. or the first 7 = http://, and if so check if they are a guest, and if so place the text. If not then leave it :D

Arantor

It requires modifying the validate part of the bbcode but in the case of the code tag there is a whole massive bunch of preparsing that goes on for it which also has to be worked around.

Mr. Pirate

i dont get what to do i've checked the code tag and it's out of my hands i have very minor experience with php scripts.
post what codes to replace and even better if you can make a mod that turns everything in code tags into a message to guests.

sangwe11

Quote from: Arantor on October 24, 2009, 05:38:45 PM
It requires modifying the validate part of the bbcode but in the case of the code tag there is a whole massive bunch of preparsing that goes on for it which also has to be worked around.

Yeh, I hadn't look at the code bbc before, so I didn't realize.

Out of interest, how come theres so much preparsing ?

Arantor

Because the code tag also checks for PHP inside it and highlights it if it finds it.

[code]<?php
echo "I'm PHP!";
?>[/code]

produces:
<?php
echo "I'm PHP!";
?>

sangwe11

Quote from: Arantor on October 25, 2009, 08:02:59 AM
Because the code tag also checks for PHP inside it and highlights it if it finds it.

[code]<?php
echo "I'm PHP!";
?>[/code]

produces:
<?php
echo "I'm PHP!";
?>


Ahh, I never noticed that before !

Thanks, for pointing it out :D

Mr. Pirate

are you going to make a mod arantor??
or just which code tags to replace?

-Thanks

Arantor

I'm not going to package this as a mod, I have far too many already.

When I figure it out I'll post instructions.

sangwe11

Quote from: Arantor on October 25, 2009, 04:42:47 PM
I'm not going to package this as a mod, I have far too many already.

When I figure it out I'll post instructions.

I can package as a mod if needs be after, for anyone else who is interested ?

Full credit of/c to Arantor for the code :D

Mr. Pirate

thank you sangwe11.
by the way i'm using SMF 2.x

Mr. Pirate


Arantor

I'm supposed to be on hiatus. So like I said, when I have an answer...

Mr. Pirate

are you still on hiatus??

Come on I've been waiting for this for months now.

Arantor

I left the team, in fact. (And actually, you've been waiting under a month, and this is something I REALLY haven't had time to figure out properly)

Advertisement: