Jump to content

Screwed by a freelancer, trying it myself..


SBS_JR

Recommended Posts

Hello, I went to one of those paid sites to try and get help with a php project, the guy bid the job and worked for a few hours and then disappeared.  Left me hanging and now I am turned off by trying to do that again so I have decided to try it myself. 

 

So I have started over, and have gotten the front end of the website done, and having a few troubles with the admin end.  So here is what I am doing...

 

Joomla 3.3

Ohanah Event Mgmt System

 

This system allows you to create events and add event photos, the system didnt allow descriptions to be added to those photos, which show on the front end and popup in a light box.

 

Here is a photo of the front end that is working now.

 

http://www.sbsracing.net/frontend-working.jpg

 

And here is the photo of the progress on the admin area, I have text fields added to each event photo once it is added.  However I am having trouble coding the display and editing of the descriptions. 

 

http://www.sbsracing.net/broken2.jpg

 

I believe this is only controlled by one file in the admin area.  I have attached it to confirm this and will show the lines of code here that I think need to be changed.

 

First would be the add photo button area, which I havent figured out how to get the description there for, but would be ok adding descriptions after the photo was uploaded.

	function createPicture() {
		if (eventPicture=="") {
			jQuery("#eventPicture").html('<table><tr><td><input id="selectPicture" type="button" class="button" value="<?=addslashes(@text('OHANAH_ADD_PICTURE'))?>"><label class="cabinet"><input type="file" class="file" name="pictureUpload" id="pictureUpload" /></label></td></tr></table>');
		} else {
			jQuery('#picture').val(eventPicture);
			jQuery("#eventPicture").html('<table><tr><td><div class="photoOver section"><div class="photo"><div style="background:url(\'http://<?=$_SERVER['HTTP_HOST'].KRequest::root()?>/media/com_ohanah/attachments/'+eventPicture+'\') center center no-repeat; height: 240px"><img width="249" height="242" src="http://<?=$_SERVER['HTTP_HOST'].KRequest::root()?>/media/com_ohanah/v2/ohanah_images/blank.gif" class="picBorder" /><div class="buttonOverlay"><ul class="photoButtons"><li><a href="javascript:removePicture(\''+eventPicture+'\');" class="deletePhoto">Delete</a></li><li><a href="http://<?=$_SERVER['HTTP_HOST'].KRequest::root()?>/media/com_ohanah/attachments/'+eventPicture+'" target="_blank" class="zoomPhoto">Zoom</a></li></ul></div></div></div></div></td><td><input id="selectPicture" type="button" class="button" value="<?=@text('OHANAH_SELECT_NEW')?>"><label class="cabinet"><input type="file" class="file" name="pictureUpload" id="pictureUpload" /></label></td></tr></table>');

And here is the code for the existing photos that are already uploaded.. which i have a text box showing for, but cant seem to get the desc to show or even better be able to edit and save it.

function createPhotos()
        {
		jQuery( "#eventPhotos" ).html('');
		var eventPhotos = '<table><tr>';
		var i = 0;
		jQuery.each(photos, function(key, value)
                {
			eventPhotos +='<td>';
			eventPhotos += '<div class="photoOver section" id="photo_container_'+i+'"><div class="photo"><div style="background:url(\'http://<?=$_SERVER['HTTP_HOST'].KRequest::root()?>/media/com_ohanah/attachments/'+value+'\') center center no-repeat"><img width="110" height="113" src="http://<?=$_SERVER['HTTP_HOST'].KRequest::root()?>/media/com_ohanah/v2/ohanah_images/blank.gif" class="picBorder2" /><div class="buttonOverlay"><ul class="photoButtons"><li><a href="javascript:removePhoto(\''+value+'\', '+i+');" class="deletePhoto">Delete</a></li><li><a href="http://<?=$_SERVER['HTTP_HOST'].KRequest::root()?>/media/com_ohanah/attachments/'+value+'" target="_blank" class="zoomPhoto">Zoom</a></li></ul></div></div></div></div><br/><input type="text" id="img_description_'+i+'" name="img_description" style="width:100px; margin-top:7px" placeholder="Description">';
			if (((key+1)%3)==0)
                        {
				eventPhotos +='</td></tr><tr>';
			}
                        else
                        {
				eventPhotos +='</td>';
			}
			i++;
		});
		
                if(photos=="")
                {
		     eventPhotos += '';
		}

	        // modifications 
	        var id = getParameterByName('id');
	        //alert(id);
                 
	        if(id!= '')
	             eventPhotos +='<td><input type="button" class="button" value="<?=addslashes(@text('OHANAH_ADD_PHOTOS'));?>"><label class="cabinet"><input type="file" class="file" name="photoUpload" id="photoUpload" /></label></td>'
	               else
                    eventPhotos +='<td><input type="button" class="button" value="<?=addslashes(@text('OHANAH_ADD_PHOTOS'));?>"><label class="cabinet"><input type="file" class="file" name="photoUpload" id="photoUpload"/></label></td>'
		if(((photos.length)%3)==1) {
			eventPhotos +='<td><img width="104" height="106" src="http://<?=$_SERVER['HTTP_HOST'].KRequest::root()?>/media/com_ohanah/v2/ohanah_images/blank.gif" /></td>';
		}
		eventPhotos +='</tr></table>';
		jQuery( "#eventPhotos" ).append(eventPhotos);
		createPhotoToolbars();
	}

Maybe I am in over my head not sure yet, and maybe I will have to pay someone to finish this, but figured I would atleast give it a try first, I have the database edited to hold the values, which I have added manually.  And they are displaying on the website correctly.  Just having issues with the admin area.

 

Help!! Thanks in advance.

 

 

 

 

 

 

images.php

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.