Forums

Having trouble grabbing cid variable.

chucho 26 Sep, 2011
How can I add a light box to edit record code? After browsing the forum I put together this code
<a class="modal" href="http://example.com/index.php/en/my-writings/email-a-letter?connectionname=emailaletter&task=editrecord&cids=<?php echo $row->cf_id; ?>" rel="{handler: 'iframe', size: {x: 600, y: 600}}">Edit</a>
but it just get the modal window or what ever it's called with my community builder profile in it this is the copied link from edit link
http://example.com/index.php/en/my-writings/email-a-letter?connectionname=emailaletter&task=editrecord cids=%3C?php%20echo%20$row-%3Ecf_id;%20?%3E
and it doesn't return the cid p.s. I would like to have just the edit form in the lightbox, not the whole page template and all. Also I would like to include if possible the edit code as a link in the recipients name as shown in the photo when they click on the recipients name like the one I circled it would open the edit popup instead of using a edit link like a button the marked out x one in the clickable photo below.
Sorry to ramble on and talk too much! also sorry about my english and coding skills.
Julio (Chucho)
chucho 30 Sep, 2011
I have found the code
&tmpl=component
to not show the template just component I thought about modalizer plugin for styling but the code still won't grab the cid to return in the link I've been racking my brain trying to figure this out. P.s. When I turn on or off sef urls depending it actually does something it says something about page row error probably because it is not grabbing the cid variable.

Thanks for everything!
Any ideas?

Julio
GreyHead 01 Oct, 2011
Hi Julio,

Where are you putting this link code? If you look at the resulting URL the PHP isn't being interpreted - it's just being encoded into the URL.

Bob
chucho 01 Oct, 2011
Hi Bob,
The code is going into the edit record field in connectivity along with lightbox or modal code but eventually I would like to make a connectivity result like some value like {text3} link to the edit record code without using the edit record field example: If {text3} = peoples names then when some one clicked on a name they would be taken in a pop up to edit that record like if they clicked John Smith they would be taken to the message they wrote about John Smith rather than using edit record, new record, etc...

Thanks Bob,

Julio
GreyHead 02 Oct, 2011
Hi Julio,

I just build the link I want in the Body box and ignore the Edit Record box.

Bob

PS I think this is in the View Details tutorial.
chucho 04 Oct, 2011
Thanks for the tutorial I have downloaded/read some of the tutorials under my email address and some under my friends email address but haden't read that one I guess. I have used the following code
<a class="modal" href="http://example.com/index.php/en/my-writings/email-a-letter?connectionname=emailaletter&task=editrecord&cids={cf_id}" rel="{handler: 'iframe', size: {x: 600, y: 600}}">{text_1}</a>
</br>
I worked good or so I thought I am using Internet Explorer 9 and it was showing the records and linking &cids={cf_id} was the key but in firefox 6.0.2 and Internet Explorer 8 I get the following error message

You are not authorized to view this page, Row Edit Error



Any help would be greatly appreciated,
Julio
GreyHead 04 Oct, 2011
Hi Julio,

I'm not sure about the Row Edit Error but the first part look as though the edit permissions aren't set in ChronoConnectivity.

Bob
chucho 19 Oct, 2011
Thanks I had an error in the link and it is working now even inside the Joomla modal window and I added this code
onclick="window.parent.document.getElementById('sbox-window').close();"
to the submit button on the form html code so that users could not use the page inside the lightbox but how do I close the modal after clicking on standard
{delete_record}
link I have this code to confirm the delete
<img src = "/trashcan.png" border = "0" title = "Delete Record" style = "width: 27px; "onclick =" return confirm ('Are you sure You want to delete ?');"/>
after they click ok to delete I would like the modal to close and so as not to have my site replicated in the modal window I have tried several things including adding the code to the end of the delete record field but I have no success.

Any help or ideas would be greatly appreciated,
Julio
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount

{item:title} {images:#}