Judah Raine
Total posts: 332
20 Oct 2012 06:59

Hi there, I am busy customizing templates for article display, and would like to add the weblink (entered as a separate field on a form) to automatically be added to the image in the article. i.e. I do not want the link to show as a separate field but to create a link when clicking on the image. My php is poor but I'm willing to learn, please can you assist.

Please ignore the rest of this message, it has been resolved thank you. Once I found and fiddled with the field parameters it sorted itself out.....

I have also got the following error when linking a menu item to a submission form:

Warning: trim() expects parameter 1 to be string, array given in /home/classicr/public_html/libraries/joomla/registry/format/json.php on line 59

It also tells me to Please edit submission form template parameters - not sure what this means or what I should do but I'm having a look at it anyway :)

Thank you!

Last Modified: 02 Mar 2014


Sergey
Total posts: 13,748
29 Oct 2012 11:07

Are you talking about form template or article? WHat are upload form is doing in article template?

What do you see in console? Are there any error?

How to look in console


Judah Raine
Total posts: 332
29 Oct 2012 13:11

There are two menu links: Request a review which public use to do just that. This is the submission form where I was having problems with the uploader. I also picked up the "TypeError: 'null' is not an object (evaluating 'el.value')" but since I reinstalled cobalt and media mint the errors seem to have resolved themselves, i.e. the uploader now displays and console no longer shows the TypeError. I've attached a latest screen print for your information.

There are no problems when I access edit article as super user. The uploader shows fine and no Type Error. (on edit the article opens as the original form).


Judah Raine
Total posts: 332
29 Oct 2012 13:14

For reference - the request a review page heading currently is Submit new Reviews. This is the heading I'm trying to change, as yet with no luck but I am persevering :D


Judah Raine
Total posts: 332
30 Oct 2012 00:48

Very weird, lol. If I go to http://classicromancerevival.com/request-a-review as public the upload fields don't show. If I log in as either test reviewer or super user the fields show.... must be a field setting then. I'm scooting to work now but will have a look as soon as I can and fiddle the permissions to see if I can change this and let you know.

I think templates is the way to go as each submission form will definitely have a different heading. Just a question as I may have misunderstood from your comment above... if I change templates will this be overwritten on update, i.e. will i have to keep changing them?? Seems an awful lot of work, lol, so I'm hoping I read too much into it.

Thanks for your help


Judah Raine
Total posts: 332
30 Oct 2012 02:47

As I said, very weird. I have gone in and checked the permissions for these fields and they are set to public can create, so there does not seem to be a logical reason why it shouldn't display the upload fields, especially since they they are using the same form template?? I'll keep looking, but your input would be appreciated.

Thanks!


Judah Raine
Total posts: 332
30 Oct 2012 02:58

Hmmm.... just a thought here... do you think it could be that cobalt does not want unregistered users (i.e. public) to upload? Maybe I'm grasping at straws but it could be possible I suppose.


Guest
04 Nov 2012 01:01

Did you use image field or some else to check uploading for public users? We can check it locally and confirm it or find our the reason.


Judah Raine
Total posts: 332
04 Nov 2012 02:29

Hi there, I'm actually having a look at this now, given that I've had permission issues which may have affected this....

I have deleted and recreated all user groups and reset access levels

I have physically checked every field permissions

I have tried setting this to public, still doesn't show

I have tried setting this to registered, still doesn't show

The requesters are child group of author, and I've set the media manager permissions for both author and requester to allow

If I log in as super user or another user who is set as a moderator to this category, I see the fields fine.

Hidden text

I sincerely hope you can assist with this, and thank you for responding on a Sunday, I didn't expect that


Judah Raine
Total posts: 332
04 Nov 2012 02:35

I need to correct this: only super users can now see the form correctly, not even moderators :O


Judah Raine
Total posts: 332
04 Nov 2012 02:41

Another update: If I use the gallery field in another type where the user can create and edit, the form shows fine.


Sergey
Total posts: 13,748
04 Nov 2012 03:03

Look with this ACL stuff you have to really know what you are doing. To be true not even all Joomla pros understands it correctly.

We can only direct you уруку are the parameters in Cobalt and fix if it does not work as expected. But it is very hard to explain the idea behind Joomla ACL.

If it is not what you understand may be you consider just to go little different way? Just leave everything by default. Use special access level to protect editing. Use moderators to give rights.


Judah Raine
Total posts: 332
04 Nov 2012 03:20

Hi there, I'm sure you must be immensely frustrated with me, especially given that I am an utter novice. :D I have done what you suggested above early this morning, and set everything to default with only the edit allowed specifically at type level, but there are still issues. I have also spent a few hours going through documentation on ACL and do have a slightly better understanding (not pro but better). I'm literally starting from scratch and working through each type and user group slowly and checking everything. It just still seems odd that a field shows for one and not the other, etc. But I will persevere and let you know what (and if) I find the solution. Thank you for your help so far.


Sackgesicht VIP
Total posts: 1,636
04 Nov 2012 05:58

Judah,

here something about ACL

ACL Concepts Overview

Access Levels

Back-and ACL

A tool to look into: ACL Manager

Maybe starting from scratch armed with the knowledge you accumulated in the last days is really a good idea.

But ACL is not everything, creating SECTIONS and TYPES as well as choosing the right fields with setting the proper parameters will be the key to your success. Refining the functionality with custom templates will come in when you have a better idea how things work together.


Judah Raine
Total posts: 332
04 Nov 2012 06:13

:D Just a tad frustrating, lol... it seems that none of the settings I use do what they should (or what I expect) and I've now spent days in what seems like ever-decreasing circles. Even something a simple as setting a moderator for a specific section allows that person to edit absolutely everything, including non-cobalt content! Anyway, I shall persevere, and try not to bug the support guys too much...


Guest
18 Nov 2012 04:50

Hello everybody,

I am a can confused with all your answers, someone knows how to put original link to image field

(not the thumb cache)?

i try some changes in :

$url = sprintf('%s/thumbs_cache/image/%s', $this->url, $new_name);

$html_img = JHTML::image($url, @$value['image_title'], array('hspace' => $this->params->get('params.img_hspace'), 'vspace' => $this->params->get('params.img_vspace'), 'title' => @$value['image_title']));

but i have not sucess , i have only the thumb url via $url variable, which variable have the original picture?

thank you


Sergey
Total posts: 13,748
18 Nov 2012 20:47

On line 43 you can see this

$this->resizer->setImage(JPATH_ROOT . DS . $value['image']);

This i where full limage is set. You can change it to

echo $this->url. $value['image'];


Guest
19 Nov 2012 15:14

I have not succeeded with your code by I managed with this, and add jquery fancybox:

$lnk= $value['image'];

$html_img = "" . JHTML::image......

here the screenshot:

Powered by Cobalt