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.


Specifying box template for main_muti_content block

Login / Search

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

Community saint

For the life of me I can't find where this is being specified; normally it's in the block template. I'd like to customize the box main_mulit_content, however, it's using STANDARDBOX_classic and I don't want the customization to show on other blocks using this box.

Thanks!
SD

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#69464
Avatar

The main_multi_content block itself does not use a box, but the content may be rendered with one, according to each content type.

E.g. if you're showing lots of polls, they would have boxes because the 'POLL' template has them.

3 approaches to solving this:
  1. Simply remove/change the boxes in the particular templates. Caveat: it will change how that displays in other places.
  2. Put a wrapper div into BLOCK_MAIN_MULTI_CONTENT.tpl with a class and use CSS rules against that class to override how descendant boxes look. E.g. .multi_content .standardbox_classic { ... }
  3. Use some Tempcode. In BLOCK_MAIN_MULTI_CONTENT.tpl put {$SET,multi_content,_true} at the top and {$SET,multi_content,_false} at the end. Then in e.g. POLL.tpl change curved to {$?,{$GET,multi_content},invisible,curved}

(invisible is a box that is… not actually visually a box at all)

({$?,x,a,b} is like a little switch)


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

Community saint

Thanks for the info Chris, I was still unsuccessful, however, as always, learned something new via your comments. Your item #3 was my option as I'm wanting to remove the {TITLE} from classic but just when main_multi is called.

Background: I jumped in head first into moving all my Youtube vid's to the gallery (hadn't worked for me in the past but no doubt operator error ;) ) from the catalogue system before I realized that there are only blocks for showing recent gallery additions but nothing for actual gallery content additions. I tried (unsuccessfully at this point) to muck one up using recent_cc and recent_downloads as guidance. What I really was looking for was just like main_recent_cc_entries and since the gallery does not include a title field for entries, thumbnails were my only remaining option. Examining the main_multi block revealed that I could use it for this purpose (utilizing the "recent" filter), however, when output, it wraps a box (classic with title bar) to each entry. I've modified all the gallery related templates as per your item #3 but cannot seem to get that title to go away. I've searched for the language string related to "Located in" in every gallery related template file but this one eludes me.

In the end, I think what I'll do is add a news article entry when I post a new video and put a side_news_block on the landing page. A little tedious for sure, however, it will keep me from adding videos willynilly to the site lol.


"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#69477
Avatar

actual gallery content additions

main_multi_content does make sense. But doesn't main_gallery_embed do it too? Or main_include_module even?

Btw, there are a couple of other templating tricks.
You can hope that {_GUID} varies in a way you put content in different places (that's what it for). So you can do Tempcode logic comparing to the value of that.

What I will often do is just use like {$?,{$MATCH_KEY_MATCH,site:start},,<h2>{TITLE}</h2>}. This example shows the h2 only if it's not the site:start page.

Regarding the specific located in thingy… I can see that's hard-coded. Sorry, my original advice was completely wrong in this case, video awards have a box defined in the PHP code (sources/hooks/systems/awards/video.php).


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

Community saint

Both blocks would certainly suffice for sure Chris, I guess I am/was stuck on just having a title listing of new additions like main_recent_cc so I'll play around a bit there and see what works. I had forgotten that the gallery had no title for entries (and for images, rightly so, lol, one would have a bunch of "this is the cat", "this is the cat sleeping", "this is the cat eating the budgie" and so on, but might be a consideration now that the gallery supports Youtube vids? There is another bonus with having titles: to edit a video from the CMS tree is very tedious as the display is the youtube URL making it difficult to identify which is which lol)

*chuckle*, funny you should mention match-keys: they are my new best ocPortal friend! ;)

Damn, and I was sniffing around awards but just didn't go deep enough. The clue being the location of main_multi in the block helper dialog. Hehehe, so close and yet so far.

Thanks again for the tips! BTW as an aside, I'm putting together a wishlist post for gallery evolution that gives perspective from an end user and I'll plop it in the developing forum for possible consideration for future versions.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#69481
Avatar

but might be a consideration now that the gallery supports Youtube vids

A common request. We've done a patch for it for a few clients, but as it's a database compatibility breaker and touches a lot of ocPortal, we're holding off until a compatibility-breaker release.


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

Well-settled

I'm kind of confused about what you're trying to do. Can you explain so I know whether to add what you're doing to my site or not? ;)
Back to the top
 
Posted
Rating:
#69499
Avatar

Community saint

Total hack, but got it done, whoohoo! ;-)



"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#69501
Avatar

Well-settled

Found what I needed.


Last edit: by Xarex
Back to the top
 
Posted
Rating:
#69502
Avatar

Community saint

Kewl! I'm writing up a tutorial for any others that are interested and I'll post a note here.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#69503
Avatar

Community saint

SoccerDad said

Kewl! I'm writing up a tutorial for any others that are interested and I'll post a note here.
Can't wait. That looks pretty damn good. Can you also explain the'what', 'where' and 'how'? Looks like something I could make good use of …

 :thumbs:

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

Well-settled

Your code looks awesome. If the entire gallery could be re-written using that code, it could even be better.. because it looks like the YouTube display pages when you search for videos and get a listing.. you get a picture and a bit of a description.

Can't wait for it either. Definitely would boost what I'm looking for in ocPortal.

At the moment, the closest thing I found was my Videos section which I'm no longer using publicly, but have stuck to the gallery of ocPortal itself.

YouTrippy Videos

If I could turn ocPortal into something like that.. but put the videos on the side or maybe the blog on the side.. not sure how I'd do it or what it would fully look like, but damn.. basically like a Video CMS Blog ;).

Lacking in that is the ability for members to post their own blog, which is what I really like in ocPortal.. even beats the WordPress CMS despite the addons there is now, but I think you're still posting under one specific Author name with WP.
Back to the top
 
Posted
Rating:
#69506
Avatar

Community saint

Done like dinner. If I missed something lemme know and as always, make the backups just in case! :-)

Create a recent video block - ocPortal

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#69507
Avatar

Community saint

P.S. I'll post the CSS and block call when I round up all the info. My global.css is a total mess  :$

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#69511
Avatar

Well-settled

I guess you got lucky. I did everything in your tutorial but ran into errors.

I have this file: STANDARDBOX_video.tpl

copied into /themes/templates_custom/ (and /templates because of an error)

(copied both to default and my custom theme)

And I am getting this error:


A template file is missing: STANDARDBOX_video (themes/default/templates/STANDARDBOX_video.tpl or an overridden equivalent to this path)

A template file is missing: STANDARDBOX_video (themes/default/templates/STANDARDBOX_video.tpl or an overridden equivalent to this path)

A template file is missing: STANDARDBOX_video (themes/default/templates/STANDARDBOX_video.tpl or an overridden equivalent to this path)

A template file is missing: STANDARDBOX_video (themes/default/templates/STANDARDBOX_video.tpl or an overridden equivalent to this path)

A template file is missing: STANDARDBOX_video (themes/default/templates/STANDARDBOX_video.tpl or an overridden equivalent to this path)
Back to the top
 
Posted
Rating:
#69512
Avatar

Community saint

Blast, yeah that's right, forgot it needs to be in the default theme folder (I was doing the tut by memory), I had the same error. Try clearing your cache; I believe that's what I did to correct it.

Lemme know!

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#69517
Avatar

Well-settled

That seemed like an awful lot of work to just get the recent videos to show, hehe.

So 2 questions:

How are you displaying your videos by your commentary?

My images show up huge. I get 5 large videos (boxes are at least removed) one after the other. How do I make them either side by side or smaller?
Back to the top
 
Posted
Rating:
#69544
Avatar

Community saint

While on the surface it does seem like a bit of an effort, once you do it a few times, it becomes second nature. I have a bunch of blocks that I've hacked up using the same methodology and one can get pretty proficient pretty quickly. Additionally, you'll learn something new about ocPortal each time ;-).

The description commentary comes from the {CAPTION} tag. It might be your match-key that is causing it not to show. I added the match-key as I wasn't sure what the impact would be by having that data available to every screen that uses IMG_THUMB.tpl and didn't have time to test it out; I'll do that in the future.

Image sizes I control via CSS. I've put a div class wrapper (primer_wrapper_video) around the output and use the following CSS:

Code

.primer_wrapper_video .img_thumb {
   width: 150px;
}


"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#70133
Avatar

Community saint

SoccerDad said

While on the surface it does seem like a bit of an effort, once you do it a few times, it becomes second nature. I have a bunch of blocks that I've hacked up using the same methodology and one can get pretty proficient pretty quickly. Additionally, you'll learn something new about ocPortal each time ;-).

I'm with Xarex on this. In just a short time, three people have had the same need: to be able to display the contents of a gallery(s) in a block. I think this functionality should be included out-of-the-box. That is the draw of what is marketed as something largely "turn-key".

I disagree with you about image titles. In an art site like mine each painting does have a title which should be displayed with the picture. I'd personally like title, submitter and submit date displayed.

While ocPortal has many good features, it's weakness is in handling groups of things in galleries (this also goes for personal galleries). You are forced to make a choice between using catalogs and galleries to display items when the real answer is something that adds some basic functionality to galleries.

At least, that's my take.

Bob
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: