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.


Making the IOTD thumbnail at the IOTD_BLOCK display larger.

Login / Search

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

Community saint

I am trying to make the IOTD thumb display larger. I think it displays the same size as the galleries thumbnails. In reading the topic View topic: Image of the day picture dim - ocPortal SoccerDad, Fletch, BobS have a solution to make it display fully-opaque separately fr'om other thumbs (I think). With this I am thinking I will have to create a separete class like they did.

Code

#iotd .img_thumb {
   opacity: 1 !important;
}

I tried this and put it in GLOBAL.CSS. I also tried separately it in GLOBAL.CSS and IOTD.CSS:

Code

#iotd .img_thumb {
        height:auto;
        width:240px;
        display: block;
        text-align: center;
        margin-left: auto; margin-right: auto
}

but it didnt work. Any ideas?

I am thinking also that the original control input for all the thumbnails is in Admin Zone / Setup / Configuration / Feature options / Thumbnail width. I guess I need to override this somehow.


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#72696
Avatar

Community saint

friendly said

I am thinking also that the original control input for all the thumbnails is in Admin Zone / Setup / Configuration / Feature options / Thumbnail width. I guess I need to override this somehow.

That looks like the case, and it looks like its a PHP change.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#72788
Avatar

Community saint

So, from the silence after temp1024's reply, I take it I would have to address it from a PHP standpoint and, from my point of view, probably not something that would be simple to impliment .


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#72794
Avatar

Community saint

friendly said

… but it didnt work. Any ideas?


So, from the silence after temp1024's reply, I take it I would have to address it from a PHP standpoint and, from my point of view, probably not something that would be simple to impliment.
I have no idea how to implement this using PHP, but I did make it work in Firebug by editing the CSS. However, since you say it didn't work for you, I decided to "keep it shut".

I remember you tried something similar 'way-back-when' and it took us a few attempts to nail it down. Perhaps it is another one of those … ?

 :'(

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#72796
Avatar

Community saint

Fletch said

but I did make it work in Firebug by editing the CSS.

You must be thinking of something related to IOTD but not actually related to increasing the size of the IOTD image.

Taking a bit of a closer look, I could find no references to the thumbnail generator "{$THUMBNAIL,…}" in global.css or IOTD.css, so a CSS only fix looks unlikely.

Also, no references to it in the IOTD templates. The templates take a finished URL, so it has to be a php problem.

But what I did find was "$thumb_url=ensure_thumbnail(…)" in main_iotd.php, which looks like a good stating point for the php investigation.

Unfortunately I don't have time to delve further for you.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#72799
Avatar

Community saint

thanks guys I'll keep trying…


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#72803
Avatar

Attachment
» Download: IOTD.tpl (195 Bytes, 87 downloads so far)
Attachment
sources/blocks/main_iotd.php
» Download: main_iotd.php (4 Kb, 114 downloads so far)


We were not passing the full image URL into the template, so I have changed that in the PHP file (will be in next patch release too). I have then showed you what template change to use the THUMBNAIL symbol with that full URL to make a custom sized thumbnail.


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:
#72822
Avatar

Community saint

Thanks Chris and the gang! I downloaded the files and installed them. Cleared the cache then I went to see what the IOTD looked like …image shows up BIG …too big I'm guessing so I went in to edit the MAIN_IOTD_BLOCK and got this error:

 
The website software has detected what may be a hacking attempt. Please do not be alarmed, and unless you are really trying to hack the website, nobody will question you. Please do not click refresh though or you could be automatically banned. If you got here via a link, please inform the link maintainer of the problem.

Beyond the error message:

I saw in the IOTD.tpl where the image (width?) could be set.
This is way cool! T-h-a-a-a-a-a-n-k-s!


Last edit: by friendly


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#72824
Avatar

Hmm, what was the stack trace for that hack attempt error? Would have been mailed to you.


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:
#72825
Avatar

Community saint

Here it is Chris:

Stack Trace (emailed to admin) said

Below is a stack trace revealing the state the software was in when the error occurred. If this represents a bug in the unmodified software, you may want to check ocPortal website for a fix, and if there isn't one, report this as a bug. Please note that merely posting a stack trace is not sufficient for us to solve your problem; the stack trace is just an aid that presents us with additional information. We still need to know the error message, what you tried to do, how you tried to do it, version numbers, and any other appropriate information.
We apologise for this problem and if it's a bug we hope you will work with us so that we can fix it for you promptly.

File '/home/prehisto/public_html/sources/failure.php' Line '426' Function 'get_html_trace' Args
File '/home/prehisto/public_html/sources/global2.php' Line '949' Function '_log_hack_attack_and_exit' Args
'EVAL_HACK'

'main_iotd '

''


File '/home/prehisto/public_html/sources/global.php' Line '388' Function 'log_hack_attack_and_exit' Args
'EVAL_HACK'

'main_iotd '


File '/home/prehisto/public_html/sources/zones.php' Line '828' Function 'filter_naughty_harsh' Args
'main_iotd '


File '/home/prehisto/public_html/sources/zones2.php' Line '384' Function '_get_block_path' Args
'main_iotd '


File '/home/prehisto/public_html/sources/misc_scripts.php' Line '581' Function 'get_block_parameters' Args
'main_iotd '


File '/home/prehisto/public_html/data/block_helper.php' Line '49' Function 'block_helper_script' Args


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#72828
Avatar

Got it. There was a space or line break on the end of the block name, which made the block assistant trip over. I'll make it more tolerant.


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:
#72831
Avatar

Community saint

So you are doing a minor fix?


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#72853
Avatar

yes


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:
#72905
Avatar

Community saint

I use this to, and it works very well. Thanks for this.


http://digiflash.nl Photo community  (dutch)
Back to the top
 
Posted
Rating:
#73036
Avatar

Community saint

Chris Graham said

Got it. There was a space or line break on the end of the block name, which made the block assistant trip over. I'll make it more tolerant.
I am getting the same ERROR MESSAGE when I click on the MAIN_BANNER_WAVE block, MAIN_SCREEN_ACTIONS block and MAIN_COMCODE_CHILDREN block. When I click on other blocks I've tried they will allow me to edit but not these.

Haven't discovered any more but I'll keep an eye out.


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#73046
Avatar

Yes. The Comcode parser strips white-space around block names, but the popup assistant does not. The fix I have done will make it all work.

I don't know how the white-space got there, but if you disable the WYSIWYG editor you can then remove it.


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
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: