Automatically Code a Link

Started by Rohan_, May 29, 2009, 05:05:11 PM

Previous topic - Next topic

MrPhil

Rohan, what are you trying to accomplish by turning URLs into [code] blocks? Are you trying to set off a link into something distinctive looking, or simply trying to keep them from turning into valid links? If the latter, the easiest way is to wrap them in [nobbc] tags. The next easiest way would be to modify SMF so that "bare" URLs without a [url] or [iurl] tag don't get turned into links. I haven't looked around, but there must be something in SMF to detect a URL and issue <a href="... you would just disable that feature. Do you want any "bare" URL (e.g., embedded in a sentence) to be so disabled, or just those all by themselves, one to a line?

I'm just trying to think if there may be an easier way to meet your objective than to detect all lone "bare" URLs and wrap [code] around them. If one could find the code in SMF to locate a bare URL and turn it into a link, I suppose it could instead be turned into a <span style="background-color: #CCCCFF; border: solid 1px black;">bare URL</span>. Of course, that would work in-line, but the box would not stretch clear across the page (maybe that could be done with some additional CSS in the style).

Rohan_

MrPhil ... i need as i said .. please
Proud To Be An Indian

Arantor

First up, a bare link is converted into [url][/url] tags in Subs.php.

So the first mod would be to convert url tags to not display as url tags, but display much like code tags.

Then the trick is to figure out how to unify them together. This is a modification that affects every aspect of the bbcode processing system, and if done incorrectly will break your forum very very badly.

I'm still not sure why you need this, but I'll add it to my to do list for 'sometime'. I cannot and will not guarantee a time, but I can guarantee it'll be a paid-for mod when I do it.

Rohan_

Arantor :( Please Big Bro i cant pay now i really dont have money online anywhere .. whenever i get money i will pay you .. Please Please do it for me ..
Proud To Be An Indian

Joshua Dickerson

Stop begging. I am pretty sure he said NOT to bump him.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Rohan_

Proud To Be An Indian

Arantor

Rohan_, I specifically asked NOT to be bumped because I have other things on. Repeatedly posting in this thread won't make it happen any faster.

Please do NOT keep bumping this thread. I am not inviting further discussion on doing this at this time because no discussion is necessary. I will look at it as time permits, no sooner no matter how much you ask.

If you persist in asking I will lock this thread because it serves no purpose to keep bumping.

Rohan_

i didn't bumped in any post i just replied to other poster without quoting .. as a Friend or as a Younger Bro i just can request you . i cant do anything more than requesting . so i am saying again that please do this A S A P
Proud To Be An Indian

Arantor

Are you still in need of this?

To be honest, I'm not sure of its purpose, but I think you would be able to achieve it by adding a quick check to Subs.php's parse_bbc function.

What exactly happens right now with your URL tags?

Rohan_

they just convert in a clickable link .. but i want my links in code blocks ( also not clickable )
Proud To Be An Indian

Arantor

So did you use the tips earlier in this thread to make them into code blocks?

I'm still not entirely sure what the benefit of doing this is, by the way.

Rohan_

what tips ? there is no way to do this yet
Proud To Be An Indian

Arantor

Really?

Funny that, since I actually answered that point... um... 2 months ago.


Arantor

My question was about moving individual links into code blocks, nothing more. Which as far as I can see the tips I already gave you would do just that.

Is that not the case?

SAFAD

yes Arnator this is what i think he is talking about
else i think he wan't some css touches to make some cool boxs around the link
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Arantor

Oh, I know what he wants. I'm just trying to work out if he's applied the first half of the tip that would simplify matters going forward.

SAFAD

You Are The Man  :)
P.S: Don't Even Think About It ;)
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Arantor

The irony is that I still don't really understand the benefit or need, though I'm well aware of other sites that use something similar and can't help but wonder if it is for a particular style of site I do not care for.

Rohan_

Note you have to edit CODEBBC and make that code instead otherwise it doesn't get posted correctly. 


? u mean to change codebbc to code ?

and i think that code is for 2.0 but i am using 1
Proud To Be An Indian

Advertisement: