Hard Light Productions Forums
Site Management => Site Support / Feedback => Topic started by: Iss Mneur on June 04, 2010, 12:05:17 pm
-
Why doesn't the forum support bb code like this:
[quote=SMF Documentation link=http://docs.simplemachines.org/index.php?topic=57.0][/quote]
That is, why doesn't the url actually auto-link like when you "quote" someone in the forum? According to the docs it is supposed to work that way.
EDIT:Fixed typo in title.
-
This works as a stopgap in the meantime: (but yeah I'd like to be able to do that too)
[quote author=http://docs.simplemachines.org/index.php?topic=57.0][/quote]
-
Just do it the way jr2 did.
blahblah
If it doesn't work like the SMF docs says, there are few possibilities:
1) The docs have been updated for SMF 2.0
2) The docs have incorrect syntax
3) The feature is broken
4) The feature doesn't exist
In any case, nothing I can do about it unless I add it by hand. Which I do not consider worth it, since you can use above example.
-
Here's the code from our forum. It appears to be implemented, but that PHP is too dense for me to parse:
array(
'tag' => 'quote',
'parameters' => array(
'author' => array('match' => '([^<>]{1,192}?)'),
'link' => array('match' => '(?:board=\d+;)?((?:topic|threadid)=[\dmsg#\./]{1,40}(?:;start=[\dmsg#\./]{1,40})?|action=profile;u=\d+)'),
'date' => array('match' => '(\d+)', 'validate' => 'timeformat'),
),
'before' => '<div class="quoteheader"><a href="' . $scripturl . '?{link}">' . $txt['smf239'] . ': {author} ' . $txt[176] . ' {date}</a></div><div class="quote">',
'after' => '</div>',
'block_level' => true,
),
This is the only occurrence of "link" in the quote tag. It's possible that it's only implemented if you quote another person's post.
-
[snip]
This is the only occurrence of "link" in the quote tag. It's possible that it's only implemented if you quote another person's post.
Thats exactly what that code says it does (which is also what I have found during experimentation). The only interesting thing about that snippet is that apparently you can use threadid in place of topic in the link parameter.
Oh well, I thought maybe I was doing it wrong, as jr2's workaround will work. But, nevertheless it would nice to be able to name the author in the standard quote header as well as link it to some site as,
[quote author=Some Place][/quote]
works, but when you combine them it does not.
Anyway, I guess that solves that.
-
Well, not necessarily. There are no fewer than four separate implementations of the quote tag. If someone could figure out the PHP to add a user-specified link, we might be able to add it.
In fact I could probably figure it out myself, but I don't have time at the moment. Somebody bug me later, if code isn't provided before then.
-
I honestly wouldn't want to bother with yet another customization to be re-added after forum upgrade. If anything, it should be brought up in the actual SMF forums and fixed there.
-
I honestly wouldn't want to bother with yet another customization to be re-added after forum upgrade. If anything, it should be brought up in the actual SMF forums and fixed there.
Ya, I can understand that, but it seems that there is no need as the forum already supports a version that actually does what we need if not quite as intuitivly as I expected.
But based on Goober5000's comment, I figure we couldn't be the first to try and do this. I checked the source code of the version 2.0 RC that SMF has on their site and it seems that
[quote author=Name link=http://example.com]Test[/quote]
is still not supported by SMF even though the bbcode reference on thier site says so.
Because the new 2.0 forum software doesn't support, I started looking at the modifications that SMF has available on their site and I found Quote Source Mode (http://custom.simplemachines.org/mods/index.php?mod=1631) which adds the exact code needed to do what I was looking for with the quote using author and link. The other interesting thing that I found on the page though is this lovely snippet:
[quote="[url=http://somesite.com]Name[/url]"]Quoted Text[/quote]
which does exactly what I want, even though it is not the expected answer, it obviously works, even on our current build.
So, I guess we now have a solution and nothing needs to be changed except for the documentation.
-
Is there any way to have the PHP or w/e it is do a word/code replacement? Sort of how the word alot (alot) gets replaced?
-
Is there any way to have the PHP or w/e it is do a word/code replacement? Sort of how the word alot (alot) gets replaced?
What is it you want replaced?
But either way it would require more modification to the forum software.
-
[quote author=Name link=http://somesite.com.com]Name[/quote]
Whenever you have the above, replace it with:
[quote="[url=http://somesite.com]Name[/url]"]Quoted Text[/quote]
-
[quote author=Name link=http://somesite.com.com]Name[/quote]
Whenever you have the above, replace it with:
[quote="[url=http://somesite.com]Name[/url]"]Quoted Text[/quote]
Oh, I see.
If we are going to do that, we may as well just add the "Source Quote Mod" directly, rather than have the forum software do a convoluted post source text transformation, that has the same result. As either would require modification to the forum software, on which topic Fury has already stated:
I honestly wouldn't want to bother with yet another customization to be re-added after forum upgrade. If anything, it should be brought up in the actual SMF forums and fixed there.
So I doubt that either would happen. Having said that, I too would like the that to be able to the the quote tag like the "Source Quote Mod" advertises (as it is far more intuitive).