HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Random Image Block

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#30356 (In Topic #6975)
Avatar

Well-settled

I was hoping I could put a block on my homepage that displays a random thumbnail image from my photo galleries that links to the full image page, I looked at the "image of the day" but it doesn't seem to do what I'm after. Does OC Portal have a function for this? Perhaps I can edit the IOTD to do what I want? Or am I going to need to find some javascript to do the job?

[OMA] Clawcity - If It Ain't You….Frag It!!!
LAN Of The Damned - Admin
Back to the top
 
Posted
Rating:
#30357
Avatar

Code

[block="image"]main_content[/block]


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#30535
Avatar

Well-settled

Is it possible to turn off the thumbnail fading?

Also is there a list of the variables you can use with the different blocks? I'm sure there used to be, but i'm buggered if I can find it.



Last edit: by clawcity

[OMA] Clawcity - If It Ain't You….Frag It!!!
LAN Of The Damned - Admin
Back to the top
 
Posted
Rating:
#30537
Avatar

To turn off image fading, edit the IMG_THUMB.tpl template.

The easiest way to find the block variables is simply to click the 'Add block' button when editing a Comcode page. You'll get a wizard that you can put field values into.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#30552
Avatar

Well-settled

Sweet, thanks

[OMA] Clawcity - If It Ain't You….Frag It!!!
LAN Of The Damned - Admin
Back to the top
 
Posted
Rating:
#30571
Avatar

Well-settled

Dunno if it was my fiddling with this that did it, but all my standardbox_wrap_classic stuff seems to have lost it's bottom border somehow….

[OMA] Clawcity - If It Ain't You….Frag It!!!
LAN Of The Damned - Admin
Back to the top
 
Posted
Rating:
#30577
Avatar

If it's any help, this is the default CSS for that:

Code

.standardbox_wrap_classic {
   margin: 5px;
   border: 1px solid #072A66; /* {$,wizard, 100% bordcolor}*/
}

One common mistake when editing CSS is to miss out a semicolon of a line. Like this for example:

Code

.standardbox_wrap_classic {
   margin: 5px
   border: 1px solid #072A66; /* {$,wizard, 100% bordcolor}*/
}
(which would stop the border being seen)

Firefox is great for debugging CSS because the error console gives errors about CSS parsing.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#36151
Avatar

Well-settled

Chris Graham said

Code

[block="image"]main_content[/block]

Does this not support image transparency? They display fine in the gallery, but when loaded in the block they have white around them.

[OMA] Clawcity - If It Ain't You….Frag It!!!
LAN Of The Damned - Admin
Back to the top
 
Posted
Rating:
#36159
Avatar

What web browser is this? I just did a test on IE 7 and it seems it has a bug whereby it can't mix opacity with an alpha-transparent PNG file.

Try removing img_thumb from the IMG_THUMB template (this'll disable the fade-in animation).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#36194
Avatar

Well-settled

I'm still using IE6, and I had already removed class="blend img_thumb" from the template

[OMA] Clawcity - If It Ain't You….Frag It!!!
LAN Of The Damned - Admin
Back to the top
 
Posted
Rating:
#36205
Avatar

aha. "blend" is required – it's used as a flag to ocPortal's Javascript to use a special technique to display alpha-transparent PNG files (IE6 doesn't support them without intervention).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#36212
Avatar

Well-settled

Oops, guess I got a bit carried away. Thanks mate :)

[OMA] Clawcity - If It Ain't You….Frag It!!!
LAN Of The Damned - Admin
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: