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
grismo
Nucleus Newbie


Joined: 05 Oct 2005
Posts: 1

Post Posted: Wed Oct 05, 2005 2:11 am   Post subject: Random Img my SQL Error
Reply with quote

Hello,
i wanted to try out your Random Img, but i did not succeed:

mySQL error with query SELECT ovalue FROM nucleus_plugin_option WHERE oid=20 and ocontextid=Object id #2: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'id #2' at line 1

do you know what may cause this error and how i can solve that?
may be i should just check the ...
thanx for help

OK, thanx anyway for help!
I solved it with the other Random txt. works perfectly
This post can also be deleted.


Last edited by grismo on Wed Oct 05, 2005 7:13 am; edited 1 time in total

Back to top

View user's profile Send private message
Trent
Nucleus Guru
Nucleus Guru


Joined: 04 Oct 2002
Posts: 1555
Location: Alberta, Canada

Post Posted: Wed Oct 05, 2005 2:53 am   Post subject:
Reply with quote

Maybe just try to download the code again from http://wakka.xiffy.nl/randomimg or leave a message in the thread for this plugin at:

http://forum.nucleuscms.org/viewtopic.php?p=34902

Trent

_________________
Life Through The Eyes Of Trent Adams!

Back to top

View user's profile Send private message Visit poster's website ICQ Number
opherko
Nucleus Newbie


Joined: 29 Dec 2005
Posts: 3

Post Posted: Fri Dec 30, 2005 4:09 pm   Post subject: Using np_Randomimg in css for banner
Reply with quote

Hi there. Is there any way that I can use np_Randomimg to swap out the banner image in my css for my skin template? It is a backgroung image but doesn't work when I try to add

Code:

#banner {
         padding: 0px;
         margin-bottom: 0;
         margin-top: 0;
                        text-align: left;
         background-color: #000;
         /* background: url(images/header.jpg); */
         background: url(<%RandomImg%>);
         height: 188px;
         border: none;
      }


essentially it just translates the special characters to ascii. I have set the appropritate path for the images in the blog settings.

I don't mind using PhotoMatt's script http://photomatt.net/scripts/randomimage for this, but thought that I'd give this a try first since I am new to Nucleus and wanted to see what I can do with a plug in.

If I go with PhotoMatt then you do the following.

- Created a folder on the server called ‘headers’, I would put it under images.
- Uploaded several different images that would suit as a header image into that folder.
- Save Photo Matt's script above as a php file (ie ‘rotate.php’) and uploaded into the same ‘headers’ folder.

Edit the CSS file.

Code:
background-image: url(headers/rotate.php);


Now, when the CSS is called, the background image is should be randomly selected by the script

Thanks,
Chris[/code]

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 Dec 30, 2005 4:29 pm   Post subject:
Reply with quote

I don't know at all if you can call Nucleus plugins in CSS code. Maybe someone with more knowledge of Nucleus interns could provide some insights?

What you could do, though, is not to use a background image defined in your CSS code as banner, but a normal inline image. Then NP_RandomImg should be usable...

Cheers,
Carsten

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

Back to top

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


Joined: 29 Dec 2005
Posts: 3

Post Posted: Fri Dec 30, 2005 10:33 pm   Post subject: Feedback appreciated
Reply with quote

Thanks for the feedback.

I've moved forward with the Photo Matt script. I am putting the 'headers' folder into the image folder within each skin. This way I can have a different random image pool for each skin. If I want to use the same skin with a different image pool I will just clone the skin, rename it, update the banners and reuse it for a different blog. This still allows me to use np_RandomImg with alternative images for each blog as well regardless of the skin, otherwise I think they would end up being the same images as the header.

Chris

Back to top

View user's profile Send private message
opherko
Nucleus Newbie


Joined: 29 Dec 2005
Posts: 3

Post Posted: Mon Jan 02, 2006 5:46 am   Post subject: alternative script
Reply with quote

I have run into some problems with Firefox and the rotating image using Photo Matt's script. Aparently, once all the images have been downloaded into Firefox through multiple refreshes or return visits, it always displays the last one loaded because of caching issues. I did some research and found another script.

http://alistapart.com/articles/randomizer/

This one doesn't appear to have the same limitations.

Back to top

View user's profile Send private message
chspnll
Nucleus Newbie


Joined: 23 Jan 2006
Posts: 1

Post Posted: Mon Jan 23, 2006 9:50 am   Post subject: Having a little difficulty
Reply with quote

Hi

I have uploaded and imported the plugin.

I have the images in a folder and set a path to the images in the php file.

The skin I am using is gnoo. The advice, as I understand it, is to add the string <%RandomImg%> to the blog options.

So I added this to the gnoo skin main page template.
I added an html image tag with the following:

<img src="<code>&lt;%RandomImg%&gt;</code> " />
If you go my site http://saiaustralia.org.au/latrobe/ you will see the result.

Any observations about what I may have overlooked or done in errror?

TIA

chris

Back to top

View user's profile Send private message
cs42
Nucleus Addict


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

Post Posted: Mon Jan 23, 2006 5:40 pm   Post subject: Re: Having a little difficulty
Reply with quote

chspnll wrote:

<img src="<code>&lt;%RandomImg%&gt;</code> " />


Just use
Code:
<%RandomImg%>
were you'd like to display it. The HTML tags are created by this plugin itself.

Cheers,
Carsten

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

Back to top

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


Joined: 19 Mar 2006
Posts: 11
Location: Marousi / Greece

Post Posted: Sun Mar 19, 2006 8:34 pm   Post subject: Help please...
Reply with quote

Hi guys.

Im a new user of Nucleus (and cms generally)
Im trying to add the randomimg plugin into my blog.

I installed it (in the admin panel) but i cant figure how to add
the images...

The plugin didnt display an "options / configuration" link

In what place I have to add the following string?

Code:
thumb.jpg|sample.html|This is a nice picture|100|200


Damn im so confused... Rolling Eyes Embarassed

Please help Exclamation

Back to top

View user's profile Send private message Send e-mail MSN Messenger
cs42
Nucleus Addict


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

Post Posted: Sun Mar 19, 2006 9:20 pm   Post subject: Re: Help please...
Reply with quote

DimitrisAndNiki wrote:

The plugin didnt display an "options / configuration" link

In what place I have to add the following string?


It's a per blog option! So you find it on the settings page of the specific blog you want to use this plugin on not in the global options.

I know that this is a bit uncommon, but unfortunately too few plugins use per blog options even if it would be a better place...

Cheers,
Carsten

_________________
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 Previous  1, 2, 3, 4, 5, 6  Next

Page 3 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