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 Photo / Video Gallery Display

Login / Search

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

Well-settled

Display random pictures/videos from the gallery

Hello,

I am migrating from PHP Fusion to ocPortal. So far, I'm impressed with the features it has come with. As much as I loved PHP Fusion and found it very easy to use, it was just filled with bugs and as much as I tried to re-code many of them, there are just some that are way too hard to re-code, and it has kind of rendered my site almost useless beyond the first few pages. So I needed a switch. I attempted a go at WordPress/BuddyPress and it didn't go so well. I was in the process of learning Joomla and in my search for a plugin to make it compaitbile with previous versions, I discovered ocPortal. And though ocPortal is going to take some time to learn, as it is a mostly completed CMS with many things already built in, I was immediately won as it contains everything I need, including a point system which gives the users several things to do in order to even want to remain on the site.. a point store, games, etc., and even a chance to sell "ad space" for points which is a great idea and encourages users to participate on the site.

There are / were two things that I had on my site when I was using PHP Fusion, and that was a gallery panel that displayed videos AND/OR photos and I could display randomly however many I wanted using the Rand() function.

Is this possible to do with ocPortal?

Thanks in advance.
Back to the top
 
Posted
Rating:
#68810
Avatar

Hey,

The main_content block can randomise against gallery images.


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

Well-settled

And videos as well?
Back to the top
 
Posted
Rating:
#68814
Avatar

yeah, the add block assistant should let you choose either as the content type


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

Well-settled

Nice, ty. I'll be back when I find something you haven't thought of ;).

Hehe jk. I'll be around.

Definitely want to learn this whole system.. only took me a week to catch on to php itself and php fusion.

And I like the fact that, although a major complaint is that it is a small community.. it is what makes it unique.. and the creation of such websites using this particular CMS which probably isn't too buggy in its main scripts, might make it even more unique.

Thanks again Chris.
Back to the top
 
Posted
Rating:
#68824
Avatar

Won't be a small community if you invite all your phpfusion friends in ;).


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

Well-settled

The main_content block is just for adding a "random" download.

I was hoping to put a panel on top of the front page with 5 or so random videos from any of the video galleries, like a teaser.

If it's the teaser that does that.. the videos and images are not displaying at all.
Back to the top
 
Posted
Rating:
#69089
Avatar

I'm pretty confused, so please clarify.

When you say 'download', are you talking about the downloads addon, or referring somehow to the videos being downloaded? If it's the former, if you use the 'Add block' tool/button to add the block it let's you pick the content type you want, including video. If it's the latter, I'm not sure I understand the issue.

(btw I think main_multi_content can probably do it to pick 5 random ones which is better than using main_content 5 times, but I can't remember off-hand.)

I'm not sure what you mean by 'teaser'. You said 'like a teaser' (i.e. you introduced the term), but then asked if it's the teaser that does that, so I'm not sure if you're referring to two different kinds of teaser there or not.


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

Well-settled

There's a block called main_teaser or something like that:

For various kinds of website, such as expert photography communities, galleries provide a place to position premium or important content. ocPortal forms a 'teaser' system, whereby you can encourage users to join a certain user-group (perhaps, via some form of subscription) that has access to view certain galleries, by 'teasing' them about them - you can define 'teaser' text for each gallery, and use the :tease page to display it, other details, and the rep-image, to them.


What I was looking for is displaying a block of 5 random videos from the video galleries which will be displayed each time the page is refreshed. Just so that my visitors/members are more likely inclined to click on a random video in the panel than go searching through the galleries when they first visit.

And main_multi_content is the same as main_content, but maybe for multiple files: it takes me to: Add a New Download.


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

Did you go through the Add Block button to add it though? Because I just tested now and it does allow choice of content type. If you just type in the Comcode directly and don't specify the parameter for the content type I think it probably does default to picking a random download.


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

Well-settled

It works Chris. Now I just have to make it show what i want.

Code

[block=gallery]main_content[/block]

or

[block=gallery]main_multi_content[/block]

This brings up either a photo gallery or the multi-content displays the actual galleries.

My code name for where all the videos are located is called 'ytv' or Videos.

Code

[block=videos][/block]
 didn't work.
and
[block=ytv][/block]
 didn't work.

Do you know what the proper code would be to display only 5 random videos from the galleries?
Back to the top
 
Posted
Rating:
#69095
Avatar

As I said, use the Add Block button, it fills it all in for 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:
#69102
Avatar

Well-settled

Ah, I was misunderstanding. Thank you for your patience Chris.

So I don't write this at all:

block main_multi_content /block


Another route through clicking Add Block.

I am trying to familiarize myself with ocPortal and where things are.. I know where mostly everything is, but I'm not sure how to add custom block.

Where is this button?


Ultimately, the outcome will look something like this:



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

Community saint

No, you don't have to type anything in.

Use the button on the top left of the WYSIWYG editor "add block". It will show you a list of blocks to choose from and help you fill out the parameters for it.

And for adding tags the button next to it "add tag assistant" is very helpful too.
Back to the top
 
Posted
Rating:
#69104
Avatar

Well-settled

Ah ha! :)

Thank you gentleman for your help.

Not sure why I missed that button.


As for displaying multi-content, it displays the videos way too large. I would just like a horizontal row of them, like shown above. Not a huge problem though, I can work with one video.


Last edit: by Xarex
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: