Dragonfly CMS v9 ⇒ CPG-BB (forum) ⇒ Forum img tag not showing image ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum Index Modules & Blocks CPG-BB (forum)

Forum img tag not showing image Reply to topic


This work for url with space but not with other character in the url like ( or ) for example. How do I add this special character in the nbbcode.php or any other character I want in the code? Any help is appreciated.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CentOS/2.2.22/4.1.22/5.2.9/9.3.3


http://www.ietf.org/rfc/rfc1738.txt wrote

Unsafe:

Characters can be unsafe for a number of reasons. The space
character is unsafe because significant spaces may disappear and
insignificant spaces may be introduced when URLs are transcribed or
typeset or subjected to the treatment of word-processing programs.
The characters "<" and ">" are unsafe because they are used as the
delimiters around URLs in free text; the quote mark (""") is used to
delimit URLs in some systems. The character "#" is unsafe and should
always be encoded because it is used in World Wide Web and in other
systems to delimit a URL from a fragment/anchor identifier that might
follow it. The character "%" is unsafe because it is used for
encodings of other characters. Other characters are unsafe because
gateways and other transport agents are known to sometimes modify
such characters. These characters are "{", "}", "|", "", "^", "~",
"[", "]", and "`".

All unsafe characters must always be encoded within a URL. For
example, the character "#" must be encoded within URLs even in
systems that do not normally deal with fragment or anchor
identifiers, so that if the URL is copied into another system that
does use them, it will not be necessary to change the URL encoding.


Reserved:

Many URL schemes reserve certain characters for a special meaning:
their appearance in the scheme-specific part of the URL has a
designated semantics. If the character corresponding to an octet is
reserved in a scheme, the octet must be encoded. The characters ";",
"/", "?", ":", "@", "=" and "&" are the characters which may be
reserved for special meaning within a scheme. No other characters may
be reserved within a scheme.

Usually a URL has the same interpretation when an octet is
represented by a character and when it encoded. However, this is not
true for reserved characters: encoding a character reserved for a
particular scheme may change the semantics of a URL.

Thus, only alphanumerics, the special characters "$-_.+!*'(),", and
reserved characters used for their reserved purposes may be used
unencoded within a URL.

On the other hand, characters that are not required to be encoded
(including alphanumerics) may be encoded within the scheme-specific
part of a URL, as long as they are not being used for a reserved
purpose.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


@NanoCaiordo I see. Can you help me with the Comments in News not showing up? dragonflycms.org/Forum...c/t=24876/ . I'm not sure what I did wrong there.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CentOS/2.2.22/4.1.22/5.2.9/9.3.3


nt

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CentOS/2.2.22/4.1.22/5.2.9/9.3.3


Hi,

It seem the Url tag not accepting some characters like "(" "," or ")".
For ex:
http://domain.com/files/Paper_(Yellow,Purple).zip

How do I modify the nbbcode so that it accept these characters? this is important for person reasons. I understood the risk that goes with using the special characters but I want to use it anyway. Any idea how I can make this work? Any help is appreciated.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CentOS/2.2.22/4.1.22/5.2.9/9.3.3


Sorry can't help with the special characters, I'm using layingbacks code.

I was a bit over linked images not being center though like attachments are, so added a new bbcode for it today.

Note I said NEW, do not alter img tag, or all your sigs will be centered too. Laughing

first add a new style as this is done in css.

.imgurl {
display: block;
margin-left: auto;
margin-right: auto }

Then I pretty much copied the img tag code, to create the new imgurl code

heres the replacements i used.

// [imgurl]image_url_here[/imgurl] code.. $patterns[] = "#\[imgurl\]([\w]+(://|\.|/)(?:%20|[^ \?%=&(\"\n\r\t<\\\])*?)\[/imgurl\]#si"; $replacements[] = "<img src=\"\\1\" class=\"imgurl\" alt=\"\" />";

Hey presto, centered images. Very Happy

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
2.6.18-164.11.1.el5xen/2.2.13/5.0.89-community-log/5.2.11/9.3.3.0


Trying this again and this is all I can find to replace??

# code..
$patterns[] = "#\[img\]([\w]+(://|\.|/)[^ \?%=&("\n\r\t<\\\]*?)\[/img] = "<img src="\\1" alt="" />";

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Dragonfly 9.3.4.0 CVS


[imgurl] (same as a url wrapped around an img, but all in one tag) is part of my enhanced BBCode, along with tables, lists, and much more.

Pro_News CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4

All times are UTC


Jump to: