Skip to main content
Topic: Named Link Testing (Read 4826 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Named Link Testing

Reply #15

These are the custom field settings, btw.
Code: [Select]
Font size
Code: [Select]
Choose your preferred font size. Examples of valid input are "14px" and "100%".
Code: [Select]
/^[0-9]{1,3}(\.[0-9]{1,2})?(em|pt|px|%)$/

To me it'd be more efficient and much more powerful to just have a custom CSS field, but this way it's easy to understand for everyone.

Another thing in there is some beloved (by one member in any case :P) SMF bb codes:

Code: [Select]
	public static function bbc_codes(&$codes, &$no_autolink_tags, &$itemcodes)
{
$codes[] = array(
'tag' => 'glow',
'type' => 'unparsed_commas',
'test' => '[#0-9a-zA-Z\-]',
'before' => '<span style="text-shadow: $1 0 0 4px">',
'after' => '</span>',
);
$codes[] = array(
'tag' => 'shadow',
'type' => 'unparsed_commas',
'test' => '[#0-9a-zA-Z\-]{3,12},(left|right|top|bottom|[0123]\d{0,2})\]',
'before' => '<span style="text-shadow: $1 $2">',
'after' => '</span>',
'validate' => function(&$tag, &$data, $disabled)
{
if ($data[1] == 'top' || (is_numeric($data[1]) && $data[1] < 50))
$data[1] = '0 -2px 1px';
elseif ($data[1] == 'right' || (is_numeric($data[1]) && $data[1] < 100))
$data[1] = '2px 0 1px';
elseif ($data[1] == 'bottom' || (is_numeric($data[1]) && $data[1] < 190))
$data[1] = '0 2px 1px';
elseif ($data[1] == 'left' || (is_numeric($data[1]) && $data[1] < 280))
$data[1] = '-2px 0 1px';
else
$data[1] = '1px 1px 1px';
},
);
}

Of course there's also the pictureFill JS:
Code: [Select]
		// Add Picturefill for DnD logo
addInlineJavascript('
// Picture element HTML5 shiv
document.createElement(\'picture\');', true);

loadJavascriptFile('picturefill.min.js', array('async' => true));

And besides some other minor adjustments to $context['html_headers'] and $forum_copyright, one ultimate edit through integrate_buffer. That way the source files are all vanilla Elk, which I love 'cause that way I don't have to worry about anything. :)

Right, sorry, totally off topic. But Elk rocks! :D

Re: Named Link Testing

Reply #16

Quote from: Spuds –
QuoteAnd... what about dropping the handle and add a button "expand" that shows the entire block instead?
Thats feature creep :P ... Could do that as well and it make sense nods .... Although one could get surprised how much stuff can be placed in a code block  O:-)
Good point.
Bugs creator.
Features destroyer.
Template killer.

Re: Named Link Testing

Reply #17

Duh-oh ... something going on with the quotes!

Re: Named Link Testing

Reply #18

hmm... guess so. :P
Bugs creator.
Features destroyer.
Template killer.

Re: Named Link Testing

Reply #19

Yeah its how I pulled out message stub for the parser, its having some problems with those nested quote blocks ... will think on it some.

Re: Named Link Testing

Reply #20

I've applied a quick "fix", lets see if it has any bad side effects.