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.


dynamic output of catalogue view page

Login / Search

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

Fan in action

WAnt to take input on the add screen and have it populate a field in the view page

Hi I am excited about using ocPortal, I just installed it yesterday. I have used a few other CMS' before, but this one looks very promising in the ease of use. 

My question is, if I have images uploaded in the catalogue input page, is there a way I can have those urls then populate a field in some output code?

To be more specific.. I upload 3 images, and when I go to the view page, I want the url's of those images to post inside some html code..

Code

<a href="mywebsite.com"><img src="URL IMAGE THAT WAS UPLOADED" width="512" height="512"></a>


This way they can take the html generated and post on another site. 

Appreciate any help given.


Back to the top
 
Posted
Rating:
#104035
Avatar

Yes, you can do this, although there's lots to learn about templating, particularly catalogue templating first. I think there's some tutorials covering catalogue templating, check the community docs and also the official tutorials.


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

Fan in action

Thank you, yes I have already templated the CATALOGUE_DEFAULT_FIELDMAP_ENTRY_WRAP.tpl for that zone to include additional information I wanted displayed. I have found the tutorial very helpful, including creating custom comcodes .. I will look some more, however i did not find anything that said how I can comcode that field so that I could reference it in the outfput code.. for instance if I made first image a comcode of img1 second one img2 etc.. then I guess I could write the code in template as so:

Code

<a href="www.mysite.com" target="_blank"><img src="[$img1]" width="512" height="512"></a>


.. and i would probably have to surround that with an html textarea, or a comcode codebox. However, how do I write that into the CATALOGUE_DEFAULT_FIELDMAP_ENTRY_WRAP so that those comcodes are assigned to those images, and do not link to someone elses upload?

Back to the top
 
Posted
Rating:
#104037
Avatar

Fan in action

wait.. I think I'm going about that backwards.. Still looking.

Back to the top
 
Posted
Rating:
#104039
Avatar

Fan in action

ok.. I think my code would look like this:

Code

<a href="http://mywebsite.com/gift_certificates/index.php?page=winnerlanding" target="_blank"><img src="[$IMG,{FIELD_7}]"</a>


The problem I'm having now is getting the catalogue into the proper zone and using this template.. i guess I have to create the catalogue after I do the template, .. ugh.. this is why I hate code.. lol.

Back to the top
 
Posted
Rating:
#104041
Avatar

Fan in action

what? I take about the ease of use I said in my first post..

"For power users only

With some file system manipulation, you may make use of the 'custom template sets' feature. You then need to go to the themes/default/templates directory in ocPortal and copy all the CATALOGUE_DEFAULT_*.tpl files to CATALOGUE_<your-catalogue-codename>_*.tpl.
You would then customise these templates.

We intentionally did not provide a highly user-friendly interface for enabling custom template sets because the process of working with multiple sets of templates is inherently difficult, and by setting it up manually you will get a better feeling for what ocPortal does."

I don't understand.. Do I create the catalogue, customize the
 CATALOGUE_DEFAULT_FIELDMAP_ENTRY_WRAP.tpl, 
then go into my cpanel and copy the all the CATALOGUE_DEFAULT_ into.. another directory ... Then create an entry and maybe I can see if the code is right?  Changing the site to look how I wanted was easy, but this has been an all day job. 

signed ready to go back to Joombla..
Back to the top
 
Posted
Rating:
#104042
Avatar

Fan in action

I think I get part of it, now that I found the downloaded new catalogue tutorial.. I copy all the default catalogue templates, and add the catalogue name into the file names, creating templates for that catalogue.. Not sure how to do that, except to download, change name, and upload..  I can then go in and edit the templates.. Still confused over the code.. I think I have to use {VIEW_URL,FIELD_7} or maybe it's {FIELD_7,VIEW_URL*} or maybe another combination.. idk.. inside the <img src> tag.. To tiered to figure out now, thanks for the point to docs help..

Back to the top
 
Posted
Rating:
#104043
Avatar

Fan in action

p.s. still don't know how that gets it into the right zone.. should I put those files into the zones template files?
Back to the top
 
Posted
Rating:
#104073
Avatar

Fan in action

ok, got it to post the url to the image in the uploads/catalogues/ with the {FIELD_5_PLAIN} posted into the url as http://www.mywebsite.com/{FIELD_5_PLAIN} .. so that it now out outputs the url as img src="http://www.escapades3d.com/uploads/catalogues/myimage.jpg" 


Great Wonderful, only thing is, that url gives me the old 403 forbidden error, I even went into my cpanel to try and change the permission, and get the same error.. I looked over the security settings and can not find anything to change to allow access to the image link.. 

So i will ask if you have any suggestions.. and please don't tell me to look in the documentation,. I have been looking in that the last two days... this should have been a simple task.

I also gave up on trying to get that to work in another zone instead of on the site zone. Maybe when I can get it to work completely, I can copy the files over into that zone.. idk, so any help there would also be appreciated. 

For others looking how to do this, the tutorial I found here http://ocportal.com/site/s/12.htm (downloadable .doc file) was the most helpful. I would add what I did to get this far if only i knew what that was, I had to restart so many times now, I am confused about how I even got it to this point. 

Back to the top
 
Posted
Rating:
#104074
Avatar

Fan in action

Also just so you know, The file folders are set to 755 and the images are at 644, and I have looked in the Permissions Tree Editor and the global privileges and see nothing that pertains to this problem.
Back to the top
 
Posted
Rating:
#104075
Avatar

I'm adding this to the docs:

If you manually alter the templates so that upload/picture fields display the raw URL, rather than going through ocPortal's downloader script, then you will need to delete the uploads/catalogues/.htaccess file. By default permissions are denied to directly access these URLs, to prevent users without catalogue access from accessing individual files.



We advertise very openly that once you get past basic configuration and want to do very individual things, you need to learn a lot of technologies. It saddens me to see cases like the above, where you've found the essentials easy, but assumed that you could just dive right into all the advanced customisations without previous expertise or a support budget.

The problem is the same for any CMS. If I knew a way to make advanced customisation easier that didn't mean investing enormous amounts of cash, honestly I'd have planned for it to happen ages ago. I know you don't think what you're doing is an advanced customisation, but it definitely is – it's the kind of territory where normally it would be programmers implementing that.

If you can think of ways to make things simpler please do post them on our tracker, it's always possible you may think of simple things we can do to refine the software that nobody on the dev team thought of. All I can think of at this point is a very sophisticated drag&drop interface, but that kind of thing is literally years of man power to implement so it's not something we have the resources to do at the moment.


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

Fan in action

Sweeet!! Yes, ty, that did the trick! To be honest, I have enough experience that I should have known that, did not even think to look at the .access file. I think this is what forums help is all about, putting people on the right track and adding more eyes and brains to the problem, 'cause sometimes the solution is staring us in the face and we just don't see it. When I read that it was like ohh DUH!!

 Now when someone else wants to accomplish something like this, maybe this post will help point them in the right  direction. Go download the tutorial that is at the end of the page in the above mentioned url, and delete your .access file if you want 3rd party access to the images in that catalog.

Thank you for your help.

I do think that could be simplified, I also understand how deploying resources for it would be costly. As I learn more about OcPortal I will be happy to contribute when and how I can in the development and in answering questions when I can.
 
Back to the top
 
Posted
Rating:
#104077
Avatar

Fan in action

p.s. I will now attempt to move it to another zone, so I can better control what is seen by the visitors to those pages.. when I figure that out, i will post those steps here.
Back to the top
 
Posted
Rating:
#104078
Avatar

Right, so moving it to another zone… basically you should be thinking about a "transparent redirect". Admin Zone > Structure > Redirects.

I do think that could be simplified

Yes, my ideas only go so far, positive feedback on what we can do always appreciated.


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

So I had a ponder on my walk to the the swimming pool…

One feature we can add that will make things a bit easier is putting "implied" templates into the list of templates to edit. So, instead of having to go copy the files, the per-catalogue templates you could override into would automatically show in the list and you'd just go through and edit them and save – and at that point they'd actually come into real existence.


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

Additionally we can try and make the template editor provide a set of parameters the template takes, even for catalogues (so it will recognise what catalogue it is for and show the parameters in a list).


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

Fan in action

That sounds great, also suggest having a button to accomplish this task.. {+START,PARAM_INFO}{+END} in a pop up window, or in a new window/tab
So that the fields are visible, and we then have the ability to get the proper comcode without having to erase the current structure and we can see it as we edit the template. That was the key to accomplishing my task. Unfortunately, I could not get that to work at first, had to delete everything I had done and start over before I got that to work. That however was the key.



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

Quick reply   Contract

Your name:
Your message: