Recent Topics

1 Oct 10, 2018 16:22    

In response to a query on how to get the correct syntax for a link/button widget :: to provide quick access to a user's posts.

I settled on using a FreeHTML widget but the problem there was the inability to use php code to pick up the [$current_User->ID]

1) I created a global javascript variable in my skin header file to get the [$current_User->ID] into javascript [uid]

var uid = "<?php echo $current_User->ID; ?>";

2) Then added a FreeHTML widget calling the javascript variable: javascript being usable in the FreeHTML widget

url="" + uid;
document.write("<a href=" + url + ">My Posts :: <em>All collections</em></a>");

More code is needed if you want to limit the output to a specific collection

Form is loading...