Jump to content

brownstone4

Members
  • Posts

    4
  • Joined

  • Last visited

brownstone4's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have some code which displays a icon which adds item to a list. When clicking the image it adds the item but I would like to show some message that this has taken place. The code is: if($params->get('show_add_to_playlist')) $buttons[] = "<a href=\"javascript:add_song_to_playlist(".$song->id.",".$playlist_id.",'s');\">".JHTML::image($jwplayer_root.'buttons/add.png',JText::_('ADD_TO_CURRENT_PLAYLIST'),array("title" => JText::_('ADD_TO_CURRENT_PLAYLIST')) )."</a>"; How and where in this code would I add a variable like 'onclick' so I can display a message saying the item has been added? Thanks.
  2. Thank you that helped. Got it to work by changing it a bit to SELECT jos_blah_comments.created_by FROM jos_blah_comments LEFT JOIN jos_community_users ON jos_community_users.userid = jos_blah_comments.created_by WHERE jos_community_users.userid IS NULL
  3. Hi, So when a user (joomla) is deleted their name, userid is removed from the jos_community_users table. However I have some extensions that keep content from that deleted user. I want to run query to see which content is left behind so I can manually delete it. I had read that maybe a JOIN query should be run but I am not sure how to write the query. Basically I need to compare for example the jos_blah_comments table which has row 'created by' with the userid numbers. I would like to compare this with jos_community_users row 'userid' and have the query show which comments have no user anymore. Any help would be appreciated, Thanks.
  4. Hi, New to php coding and using Joomla and have a question about how to write a query to the database to create a new link. Basically I am trying to create a link on a page which will link to the 'item' page of logged in user. So at the moment the link below will link to the currently viewed item of another user. <a href="<? echo JRoute::_('index.php?option=com_prod&view=item&id=' . $this->item->id); ?> What I need to do is make the link go to the item of the user who is logged in when they click on it. In the database under '_prod_items' for example there is rows with the item id 'id' and the user id 'user_id'. The component functions in a way so that users can only create one 'item'. So how can I make a query to get that item 'id' to put in a link based on the 'user_id' that is logged in? Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.