Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: requests  (Read 9773 times)

0 Members and 1 Guest are viewing this topic.

danp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
requests
« on: October 05, 2003, 07:58:01 pm »

Two requests, I'd like to be able to use html in the picture's title and description so I could have a link under the picture.  And when someone isn't logged in and they try to access the gallery it gives some weird error like, "can't get to database", make it say something like "sorry you must login to view this album".
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
requests
« Reply #1 on: October 05, 2003, 10:46:14 pm »

usage of html in titles is definitely a no-no, since coppermine is supposed to be a gallery where not only you (the site admin) can post, but also your users; allowing html code would be a huge security risk.
Instead, use ubbc (the same stuff used here on this board to create links) - see online doc.

Your second issue isn't actually a feature request, but is caused by some misconfiguration (either in your coppermine install or your server). Re-post it as support request with a link and as many information as necessary (actually quote the error message with copy and paste!) on the proper support board for the version of coppermine you're using.
Be sure to read the faq and manual before you post, and be sure to search the board first for an answer.

GauGau
Logged

danp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
requests
« Reply #2 on: October 06, 2003, 07:06:56 am »

I can't get the bbcode to work, here is one of the links I made in an image's description.

Code: [Select]
[url=http://www.beautyanalysis.com/]Beaury Analysis[/url]

Here is the link to the album, but you have to register for free first.

http://www.correct-proportion.com/modules.php?name=coppermine&file=thumbnails&album=1

The docs say that it supports bbcode in the album and image descriptions, being able to put it in the image's title would be nice.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
requests
« Reply #3 on: October 06, 2003, 09:11:40 am »

You can't expect a supporter to bother with registration first - next time you ask for support provide an account in your posting as well :evil: .
That's why I didn't check on your gallery!
To enable ubbc in custom fields, make sure to read http://coppermine.sourceforge.net/faq.php?q=linksInCustomFields#linksInCustomFields

I'll move this to support - since you're running a phpnuke version I can't be bothered anyway - that's not my line of work... :wink:

GauGau

P.S. read How to ask a question on support
Logged

danp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
requests
« Reply #4 on: October 07, 2003, 08:16:57 am »

bbcode isn't working in the images' descriptions or titles, I did the thing you said but that is for custom fields which I'm not using.

http://www.correct-proportion.com/modules.php?name=coppermine&file=thumbnails&album=1

user: nimrod
pass:guitar

Has nothing to do with phpnuke, help, please!  :wink:
Logged

danp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
requests
« Reply #5 on: October 07, 2003, 06:57:12 pm »

bump
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
requests
« Reply #6 on: October 08, 2003, 02:09:53 am »

Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

danp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
requests
« Reply #7 on: October 11, 2003, 02:27:58 am »

I installed coppermine by itself, not in nuke and bbcode does not work.  Is it supposed to, does it work for anyone else?
Logged

danp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
requests
« Reply #8 on: October 14, 2003, 12:32:36 am »

Whats up with my bbcode?

(http://www.correct-proportion.com/temp/bbcodeError.jpg)

Can't really read it in the pic, but what it says is...
Code: [Select]
[url=http://www.beautyanalysis.com]Beauty Analysis[/url]

This is supposed to work right?
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
requests
« Reply #9 on: October 14, 2003, 01:39:22 am »

I couldn't get it working either.  After looking at the code, I made a fix.  In functions.inc.php, replace the entire function bb_decode($text) with:
Code: [Select]

function bb_decode($text)
{
        $text = " " . $text;

        static $bbcode_tpl = array();
        static $patterns = array();
        static $replacements = array();

        // First: If there isn't a "[" and a "]" in the message, don't bother.
        if (! (strpos($text, "[") && strpos($text, "]")) )
        {
                return $text;
        }

        // [b] and [/b] for bolding text.
        $text = str_replace("[b]", '<b>', $text);
        $text = str_replace("[/b]", '</b>', $text);

        // [u] and [/u] for underlining text.
        $text = str_replace("[u]", '<u>', $text);
        $text = str_replace("[/u]", '</u>', $text);

        // [i] and [/i] for italicizing text.
        $text = str_replace("[i]", '<i>', $text);
        $text = str_replace("[/i]", '</i>', $text);

        //if (!count($bbcode_tpl)) {
                // We do URLs in several different ways..
                $bbcode_tpl['url']  = '<span class="bblink"><a href="{URL}" target="_blank">{DESCRIPTION}</a></span>';
                $bbcode_tpl['email']= '<span class="bblink"><a href="mailto:{EMAIL}">{EMAIL}</a></span>';
               
                $bbcode_tpl['url1'] = str_replace('{URL}', '\\1\\2', $bbcode_tpl['url']);
                $bbcode_tpl['url1'] = str_replace('{DESCRIPTION}', '\\1\\2', $bbcode_tpl['url1']);

                $bbcode_tpl['url2'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']);
                $bbcode_tpl['url2'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url2']);

                $bbcode_tpl['url3'] = str_replace('{URL}', '\\1\\2', $bbcode_tpl['url']);
                $bbcode_tpl['url3'] = str_replace('{DESCRIPTION}', '\\3', $bbcode_tpl['url3']);

                $bbcode_tpl['url4'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']);
                $bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\\2', $bbcode_tpl['url4']);

                $bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);

                // [url]xxxx://www.phpbb.com[/url] code..
                $patterns[] = "#\[url\]([a-z]+?://){1}([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+\(\)]+)\[/url\]#si";
                $replacements[] = $bbcode_tpl['url1'];

                // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
                $patterns[] = "#\[url\]([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+\(\)]+)\[/url\]#si";
                $replacements[] = $bbcode_tpl['url2'];

                // [url=xxxx://www.phpbb.com]phpBB[/url] code..
                $patterns[] = "#\[url=([a-z]+?://){1}([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+\(\)]+)\](.*?)\[/url\]#si";
                $replacements[] = $bbcode_tpl['url3'];

                // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
                $patterns[] = "#\[url=([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+\(\)]+)\](.*?)\[/url\]#si";
                $replacements[] = $bbcode_tpl['url4'];

                // [email]user@domain.tld[/email] code..
                $patterns[] = "#\[email\]([a-z0-9\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
                $replacements[] = $bbcode_tpl['email'];
        //}

        $text = preg_replace($patterns, $replacements, $text);

        return $text;
}


Should do the trick.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
requests
« Reply #10 on: October 14, 2003, 02:04:13 am »

Remember, only the description field is decoded, not the title!
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

danp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
requests
« Reply #11 on: October 14, 2003, 02:53:58 am »

Thanks, I'll try it tonight.

I just saw that your from panama city!!! I grew up there, just moved from there to seattle.  Small world.
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
requests
« Reply #12 on: October 14, 2003, 02:55:36 am »

Been on the beach for about 2 years now.  Pretty nice place.  PC is finally getting a Best Buy, and the beach is getting a Home Depot.  They'll join the 21st century sooner or later.  :lol:
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots
Pages: [1]   Go Up
 

Page created in 0.036 seconds with 19 queries.