Nucleus Support Forum Index

Find on the forum:
any terms  all terms  Advanced Search

RSS 2.0
Browse posts: Unanswered | Mark all read

« »
Loading Nucleus FAQ ticker...
Post new topic Reply to topic
Author Message
cs42
Nucleus Addict


Joined: 28 Mar 2005
Posts: 79
Location: Dresden, Germany

Post Posted: Wed Apr 27, 2005 11:43 pm   Post subject: NP_RandomImg
Reply with quote

Hi,

just added my NP_RandomImg plugin to the Wiki.

With this plugin you can define a list of images including some attributes (title, where to link to, dimensions) in the blog settings area and show a random one on your pages.

Actually I wrote this to show some thumbnails on my blog and link to these to the appropriate page of my gallery (this is no php solution yet, but created with an "offline" script). Further on I really do like titles and alt tags. Smile

This isn't a real database solution and the image sizes have to be given by hand (if you want to have width and height attributes), because I didn't want too much complexity...

Cheers,
Carsten

Back to top

View user's profile Send private message Visit poster's website
admun
Nucleus Guru
Nucleus Guru


Joined: 20 Oct 2003
Posts: 4086
Location: San Francisco, CA, USA

Post Posted: Thu Apr 28, 2005 12:08 am   Post subject:
Reply with quote

cool! I was doing this by using NP_Random with a file with img tags. Cool
_________________
Personal blog: http://edmondhui.homeip.net/blog/
NucluesCMS dev blog: http://edmondhui.homeip.net/nudn/

Back to top

View user's profile Send private message Visit poster's website
Ashitaka
Nucleus Addict


Joined: 20 Apr 2005
Posts: 71

Post Posted: Thu Apr 28, 2005 3:13 am   Post subject:
Reply with quote

me too

i'm going to try it

Back to top

View user's profile Send private message Visit poster's website
cs42
Nucleus Addict


Joined: 28 Mar 2005
Posts: 79
Location: Dresden, Germany

Post Posted: Thu Apr 28, 2005 6:47 am   Post subject:
Reply with quote

admun wrote:
cool! I was doing this by using NP_Random with a file with img tags. Cool


Hm, I didn't have this idea Wink

Back to top

View user's profile Send private message Visit poster's website
Mnementh
Nucleus Newbie


Joined: 28 Jan 2005
Posts: 19

Post Posted: Fri Apr 29, 2005 9:45 am   Post subject:
Reply with quote

Hi,

I encountered the problem that when I enter Cyrillic script in the descriptive string this would disturb the blogname settings.

A question: where would I specify that I do not want a link border around linked images?

Greetings

M.

Back to top

View user's profile Send private message
cs42
Nucleus Addict


Joined: 28 Mar 2005
Posts: 79
Location: Dresden, Germany

Post Posted: Fri Apr 29, 2005 4:23 pm   Post subject:
Reply with quote

Mnementh wrote:

I encountered the problem that when I enter Cyrillic script in the descriptive string this would disturb the blogname settings.

Sorry, but I don't understand right now. You use Cyrillic script for the image description and then what gets disturbed? (Actually I don't know how I'd test this...)

Mnementh wrote:

A question: where would I specify that I do not want a link border around linked images?

Well that is easy. I'd put a div around like that
Code:
<div id="randomimg"><%RandomImg%></div>

and then in your css you define
Code:
#randomimg img {border:none;}
div#randomimg {padding:0;margin:0;}

So there's actually no need to change something in the plugin code to do any formatting you like. Just put a div around the Skinvar.
Cheers,
Carsten

_________________
http://foto-cs.de/blog/

Back to top

View user's profile Send private message Visit poster's website
Mnementh
Nucleus Newbie


Joined: 28 Jan 2005
Posts: 19

Post Posted: Sat Apr 30, 2005 7:17 am   Post subject:
Reply with quote

Hi there,

thanks for the info about how to format that specific plugin best Wink BTW - great work, apart from the ALT tag problem this plugin works a treat! Smile I link to categories by the pictures, so that people clicking on them choose the category corresponding to the sample pic.

As to what happens, let me try to explain it:

I would have liked to write the ALT-description in cyrillic letters, as I do currently e.g. with the pictures uploaded normally to the blog without any trouble.

I go into the blog settings, where you'll find the blog name/title already written in Russian script.

I then feed the cyrillic letters between the two slashes, it shows all right, but after I save the whole thing the formerly correctly written blog name/title is not anymore dislayed in cyrillic letters, not even the "äüüyyy" letters which cyrillic sites display when UTF is turned off, instead I get "#&0203" strings, which means strings of html letter codes.

Can't describe it better.

You can duplicate this easily:

- install russian language, switch to russian and give the blog a cyrillic letter name
- install your plugin, and try to give a picture a cyrillic ALT description

I haven't any other special letter languages installed, but I'd hazard the guess that it could be similar with e.g. Chinese or Japanese or French.

Greetings

M.

Back to top

View user's profile Send private message
cs42
Nucleus Addict


Joined: 28 Mar 2005
Posts: 79
Location: Dresden, Germany

Post Posted: Sat Apr 30, 2005 8:58 am   Post subject:
Reply with quote

Mnementh wrote:

I haven't any other special letter languages installed, but I'd hazard the guess that it could be similar with e.g. Chinese or Japanese or French.


I'll test this with German umlauts. As I'm just using English right now, I didn't see this. As you describe this I suppose something like that may happen anytime you use non ASCII letters. AFAIK the support for UTF-8 is not complete yet in Nucleus in general. Maybe this is related. I think a not very nice workaround coud be to code the alt/title entries completely as HTML entities. Sad

Maybe someone with more experience in Nucleus core could comment on this?

So far,
Carsten

_________________
http://foto-cs.de/blog/

Back to top

View user's profile Send private message Visit poster's website
cs42
Nucleus Addict


Joined: 28 Mar 2005
Posts: 79
Location: Dresden, Germany

Post Posted: Sat Apr 30, 2005 9:25 am   Post subject:
Reply with quote

Ok, it works with German umlauts. I suppose because they don't need UTF but are representable in ISO-8859.

Mnementh wrote:
Hi there,
- install russian language, switch to russian and give the blog a cyrillic letter name
- install your plugin, and try to give a picture a cyrillic ALT description


I have one problem here, I don't know yet whether it is easy for me to enter cyrillic letters... Sad

_________________
http://foto-cs.de/blog/

Back to top

View user's profile Send private message Visit poster's website
cs42
Nucleus Addict


Joined: 28 Mar 2005
Posts: 79
Location: Dresden, Germany

Post Posted: Sat Apr 30, 2005 9:55 am   Post subject:
Reply with quote

Unfortunately I can just say: works for me. Wink

I had a look around in the forum and found this http://forum.nucleuscms.org/viewtopic.php?p=20091#20091

Further on the admin site lacks a character encoding definition in the XHTML code! (By that it doesn't even validate if the web server doesn't supply a correct HTTP Content-Type field.) This could be a problem depending on the browser you use?

I'm a bit at a loss here...

_________________
http://foto-cs.de/blog/

Back to top

View user's profile Send private message Visit poster's website
Post new topic Reply to topic
Display posts from previous:   

Goto page 1, 2, 3, 4, 5, 6  Next

Page 1 of 6

All times are GMT + 1 Hour

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group