Recent Topics

ID, grp_ID ... into post

Started by on May 01, 2017 – Contents updated: May 03, 2017

May 01, 2017 11:05    

I just want the only admins can access Modifica and Sterge buttons
See here http://antiromanism.info/index.php/trimite-un-pont
I want to put the 'ID', 'grp_ID' and 'login' for current user into a post/page. Any idea?
This code not work. Always displays author id of post. But i want to display current user id.

function RenderItemAsHtml( & $params ) {
  $search_list = array(
    '#\[UserID]#'
  );

  global $current_User;
  $replace_list = array(
    $current_User->ID
  );

  $content = & $params['data'];
  $content = replace_content_outcode( $search_list, $replace_list, $content );

  return true;
}

May 02, 2017 02:10

Modifica and Sterge

What are these buttons in English?

What displays this? Is it a plugin? which one?

May 02, 2017 18:24

Adauga, Modifica and Sterge mean Add, Modify and Delete
'Adauga' add item
'Modifica' modify item
'Sterge' delete item

I just want only admin to be able to access Modifica (Modify) and Sterge (Delete).
'Adauga' (Add) can be accessed by anyone.
See here http://antiromanism.info/index.php/trimite-un-pont

This is a plugin that replaces [UserID] with
'<iframe frameborder="0" width="530" height="600" src="/plugins/unelte_plugin/tools/ponturi/index.php?userid='.$current_User->ID.'"></iframe>'

This code not work. Always return author id of post. But i want to return current user id.

function RenderItemAsHtml( & $params ) {
  $search_list = array(
    '#\[UserID]#'
  );

  global $current_User;
  $replace_list = array(
    '<iframe frameborder="0" width="530" height="600" src="/plugins/unelte_plugin/tools/ponturi/index.php?userid='.$current_User->ID.'"></iframe>'
  );

  $content = & $params['data'];
  $content = replace_content_outcode( $search_list, $replace_list, $content );

  return true;
}

May 03, 2017 08:54

I have resolved otherwise. I modified the skin directly.

Unfortunately RenderItemAsHtml not return current user id.


Form is loading...

powered by b2evolution free blog software – This forum is powered by b2evolution CMS, a complete engine for your website.