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: Problem adding link with unicode text  (Read 4585 times)

0 Members and 1 Guest are viewing this topic.

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Problem adding link with unicode text
« on: October 29, 2005, 12:26:38 pm »

I've used search, and found no similar problem

I've added this code to theme.php (waterdrop), after the "albums" link

<!-- BEGIN forum_list -->
                        <a href="http://www.damireke.com/forum/" title="ფორუმი">ფორუმი</a>
                        <img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />
<!-- END forum_list -->

for some strange reasons, I'm getting error "unexpected $ in theme.php at line 1395"

What I'm doing wrong?
« Last Edit: October 30, 2005, 01:53:44 pm by GauGau »
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Problem adding link with unicode text
« Reply #1 on: October 29, 2005, 07:01:37 pm »


I can't see anything wrong with the link you added.  I even ran it on my own setup. The problem lies elsewhere.  Did you check to see if you had an extra $ <--character in 1395? Or a space between the $ and the parameter that doesn't belong?

Dennis
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Problem adding link with unicode text
« Reply #2 on: October 30, 2005, 07:52:22 am »

Problem only arises when I try to save edited theme.php in UTF-8. If I save it in plain format, there is no problems, but my text is converted to garbage in such case (it requires UTF-8 to be displayed). If I save to UTF-8, then again, we have this problem.
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Problem adding link with unicode text
« Reply #3 on: October 30, 2005, 08:03:10 am »

Possibly, the only way around this is to mimic the ALB_LIST_LNK menu pattern and place two declared parameters, appropriate to your link,  in your language file and have theme.inc.php call these from the language file.  Save the language file in utf-8, and the theme.inc.php file as text.
Dennis
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Problem adding link with unicode text
« Reply #4 on: October 30, 2005, 12:04:21 pm »

don't save coppermine core files (except the language files) in utf-8, as most editors deliberately add a byte order mark (aka "BOM") at the very start of the page but don't display it. Don't add unicode special chars into the core code files. Instead: use html entities as a workaround, or define strings in your language file that hold your language stuff.
Logged

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Problem adding link with unicode text
« Reply #5 on: October 30, 2005, 01:42:45 pm »

Hm, I've solved that problem in this way:

Instead editing theme.php in frontpage, I've opened it from notepad, made changes, and then saved as utf-8. Everything works ok now, thanks all for hints.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Problem adding link with unicode text
« Reply #6 on: October 30, 2005, 01:53:28 pm »

never, ever use a WYSIWYG editor like MS frontpage to edit coppermine files.
Logged

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Problem adding link with unicode text
« Reply #7 on: October 30, 2005, 02:09:59 pm »

Personally, I'd prefer not to edit anything at all, but we have no choice..... :)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Problem adding link with unicode text
« Reply #8 on: October 30, 2005, 02:14:47 pm »

yeah, but when you feel the urge to edit anything, use an editor instead of an app that is meant to be used only by complete newbies to play with html pages they created in the first place. Frontpage can not be used with any pre-mad script, it is just plain wrong to use it at all. This is not meant to be a flame against the app or the company that created it, but you should use the tools for what they have been built to be used. Frontpage has been bult to doodle an html page on your local PC, you can't use it for anything else.
Logged
Pages: [1]   Go Up
 

Page created in 0.043 seconds with 20 queries.