Jump to content

Tonyzomba

New Members
  • Posts

    2
  • Joined

  • Last visited

Tonyzomba's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey thanks for the reply, im not new to wordpress bad im very poor php knowledge, i cant write it but i can read and get the aproximate meaning of it. so yeah my question is maybe the code is reuploading the image to another folder and i need to have a folder or for that matter or what exactly it is doing? this piece of code is not displaying the image its for setting the main image, just what the process is, how does it set it to main image? i will try to find the code that actually has to display it. Just this theme is a little too big lol, its got 40 pages of php, and cant find the loop of the profiles or single post :/ maybe if someone could take a look from an Admin to it, i'd give access to the site. Waiting for my savior))
  2. Hey guys. I am Looking for some help here, dunno where else to ask, but im sure someone will know where my problem is. I got this wordpress theme and cant work out whats wrong with the display image. on front end i can set the image as main image heres the php of it <?php ini_set( 'display_errors', 0 ); require( '../../../../wp-load.php' ); if (!is_user_logged_in()) { die(); } $attachmentid = (int)$_GET['id']; if ($attachmentid == 0) { die(); } global $current_user; get_currentuserinfo(); $userid = $current_user->ID; $post = get_post($attachmentid); $photo = $post->post_title; $post_parent = get_post($post->post_parent); $upload_folder = get_post_meta($post_parent->ID, "upload_folder", true); $author_id = $post_parent->post_author; //if the current user is the one who added the post if ($author_id == $userid || current_user_can('level_10')) { update_post_meta($post->post_parent, "main_image_id", $upload_folder."/".$photo); echo _d('Default image has been set',779)."<br />"._d('Refresh the page to see it change',780); } ?> and im not quite sure whats happening here, im a total ROOKIE at php as a matter of fact so yeah... the second part... the loop where its supposed call for the image, i cant really find it in all those files... maybe if somebody explains to me what happens in the last 4 liines i might figure out whats wrong?
×
×
  • 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.