PDA

View Full Version : Submit without Images - Urgent !!!!


mpiper
03-12-2007, 06:47 AM
When my users submit an article without images in the mosimage place appears : users/right||1|| and users/left||1|| (see attach). How can we change the code so when someone submit an article without foto nothing add in the mosimage area ?

Thanks
Michael

fwelgemoed
03-12-2007, 09:57 AM
I get the same problem, but also when I upload 1 image for the introtext and no image for the text, I get coding for 1 image in the introtext (but the image isn't uploaded, and the '|right||' coding for the other.:((

fwelgemoed
03-12-2007, 10:32 AM
On my other website it works fine so I tried to see what is the difference.
I saw that the TEMP map (in IMAGES) was 777 on the good working site and 755 on the problem-site.
After changing to 777 also everything works fine.:)
(But I don't know if this is safe for security reasons)

MiCCAS
03-12-2007, 10:58 AM
Having it set to 777 shouldn't prove to be a security hazard.

mpiper
03-12-2007, 01:21 PM
My folder has aldready 777 atributes. Anyone knows something else ?

MiCCAS
03-12-2007, 09:41 PM
I've unmarked this as solved.

Have you got the latest version of Joomla installed?

mpiper
03-13-2007, 08:20 AM
Yes i use the latest version of joomla 1.0.12

stephenbuck415
03-15-2007, 10:47 PM
I'm running Joomla 1.0.12 and JA Submit 2.1.

images/temp is chmod'ed to 777.

Images do not upload with news submissions... Have I missed a setting somewhere?

Thanks

fwelgemoed
03-18-2007, 12:16 PM
:confused:

Although I thought setting the TEMP to 777 solved the problem, it seems that for some reason it worked okay after that. But now the problem re-appeared, even with 777.

The problem also appears when submitting only an image for the main text.
(first image unknown in the Item's MOSIMAGE-list : users/|right||1||)

When submitting only to the intro text it seems to work okay, but it doesn't, only it doesn't show the (wrong) second MOSIMAGE in the list.

holahola84
04-01-2007, 07:07 AM
This is what I did to solve the issue. You might want to give it a try. At around line 90 of ja_submit.php, replace the code from start of introtext image to end of maintext image with the code below.


//introtext image
$Nameimage1 = $_FILES['image1']['name'];
$Nameimage2 = $_FILES['image2']['name'];
// hola put image pointer under if ($Nameimage1!="") for intro and main.
if ($Nameimage1!=""){
if ($_POST['caption1'] != '') {
$row->images="users/".$Nameimage1."|left||1|".$_POST['caption1']."|bottom||";
} else
{
$row->images="users/".$Nameimage1."|left||1||";
}
$addmos = "{mosimage}";
$row->introtext=$addmos.$row->introtext;
}

//main text image
if ($Nameimage2!=""){
if ($_POST['caption2'] != '') {
$row->images.="\n"."users/".$Nameimage2."|right||1|".$caption2."|bottom||";
} else
{
$row->images.="\n"."users/".$Nameimage2."|right||1||";
}
$row->fulltext=$addmos.$row->fulltext;
}


Basically what I did is put the image pointer inside the if function which checks if any image is uploaded, so that nothing will be created if no image is uploaded. Oh, and I also switch the intro image to left, and the main to right, u might want to switch back if u prefer the original.

fwelgemoed
04-02-2007, 09:13 AM
Thanks for your reply.

I tried it and it works.
But when I supply only a main text image (and no intro text image) it doesn't work.

I can see that in that case the statement >>> $addmos = "{mosimage}"; <<< isn't executed, and I think that that does the trick, but I'm still new in Joomla, so I don't know (yet) how to solve this.

Suggestion?

dpk
04-16-2007, 12:01 AM
I hope a solution is found for this...

those junk images ja submit creates have a height/width of ZERO so they will crash (divide by zero error) the mods at www.cknguyen.net that create article previews with thumbnails pulled from articles.

ShannonN
04-16-2007, 12:16 AM
I hope a solution is found for this...

those junk images ja submit creates have a height/width of ZERO so they will crash (divide by zero error) the mods at www.cknguyen.net (http://www.cknguyen.net) that create article previews with thumbnails pulled from articles.

I think everyone here has to realise its a FREE item and probably not a viablebusiness thing to spend 20 to 30 man hours tweaking a freebie? Especially seeing a very large number of users are not members and never will join as they are too tight to pay for stuff, to the Club members like myself who pay to be here , I hear what you're saying

When the extensions club version of JA submit is finished and released, I'm sure the guys will have looked carefully at all these issues with the free version and incorporated changes into the paid version, I don't think the JAEC will be an expensive choice, given the list of extensions planned and we know if we pay for it it will be universal in application ( not limited to any one template)

Wait for the Extensions club version

ShannonN

fwelgemoed
04-17-2007, 09:30 AM
:((
Wel Well, don't jump to conclusions too soon.

Give new Joomla-users, like me, a chance to find their way.

I'm allways prepared to pay for the stuff I use or to co-operate.
But, like many others, I have to try things out, before I can see if all this is something for me.

That includes the software and the participation in fora like this.

F.i. I din't even knew that there was a paid version of JA-Submit.
And if there is, why doesn't the unpaid version do the same things?

So, I'll look around a bit more, hoping to be helped and to be welcomed in the Community.
:)

ErikThorsen
04-17-2007, 09:46 AM
I think what Shanny is trying to say is that yes, there might be some issues with modifying a component like JA Submit. Currently there aren't any paid versions of JA-submit but if you check the forum here, you can read announcements that there will be a JAEC ( Joomlart Extension Club ) here. Which would include components that would be possible to use with all Joomlart templates.

True, people might help you also with customizing this component. The community here is relatively active. However, due to the Joomlart releasing the JAEC, I would assume that most people are just sitting on the fence waiting for new releases before digging into the code again. :-)

MiCCAS
04-17-2007, 09:57 AM
I was under the impression that we sold JA Submit separately already.

fwelgemoed
04-17-2007, 10:03 AM
Does that mean that this isn't a bug, but a question of incorporating JA Submit with the template I'm using?

MiCCAS
04-17-2007, 10:09 AM
Look, I will say that you won't get the best support unless you pay for the new extensions club, but I will try and help you as best I can.

Now, I'm not 100% sure, but have you disabled any mambots? And have you tried uninstalling and reinstalling?

fwelgemoed
04-17-2007, 10:20 AM
Look, I will say that you won't get the best support unless you pay for the new extensions club, but I will try and help you as best I can.

Okay, that I didn't understand. Thanks for helping me.

Now, I'm not 100% sure, but have you disabled any mambots? And have you tried uninstalling and reinstalling?

No things disabled myself.
Disabled are
- Legacy Mambot includer
- Code Support
- GeShi

No I din't try reinstalling. Shall I try this first?

vskamme
05-26-2007, 10:15 PM
Hallo holahola :) Thank you so much for your code replacement, that did the trick!

tangch
08-30-2007, 11:34 PM
When my users submit an article without images in the mosimage place appears : users/right||1|| and users/left||1|| (see attach). How can we change the code so when someone submit an article without foto nothing add in the mosimage area ?

Thanks
Michael

Hi Michael!

I am having the same problem and came across your post while loking for the solution. The php codes submitted by holahola84 in this thread doesn't seem to work for me. Have you actually solved the problem by now? Can you give me some tipps?

tangch
www.Reisen.InfoArchiv.com (http://reisen.infoarchiv.com)

amlinc
10-03-2007, 02:18 PM
This is what I did to solve the issue. You might want to give it a try. At around line 90 of ja_submit.php, replace the code from start of introtext image to end of maintext image with the code below.


//introtext image
$Nameimage1 = $_FILES['image1']['name'];
$Nameimage2 = $_FILES['image2']['name'];
// hola put image pointer under if ($Nameimage1!="") for intro and main.
if ($Nameimage1!=""){
if ($_POST['caption1'] != '') {
$row->images="users/".$Nameimage1."|left||1|".$_POST['caption1']."|bottom||";
} else
{
$row->images="users/".$Nameimage1."|left||1||";
}
$addmos = "{mosimage}";
$row->introtext=$addmos.$row->introtext;
}

//main text image
if ($Nameimage2!=""){
if ($_POST['caption2'] != '') {
$row->images.="\n"."users/".$Nameimage2."|right||1|".$caption2."|bottom||";
} else
{
$row->images.="\n"."users/".$Nameimage2."|right||1||";
}
$row->fulltext=$addmos.$row->fulltext;
}


Basically what I did is put the image pointer inside the if function which checks if any image is uploaded, so that nothing will be created if no image is uploaded. Oh, and I also switch the intro image to left, and the main to right, u might want to switch back if u prefer the original.

i checked my permissions in the image/temp folder and they are 777......I am having trouble with the pictures, when someone submits with a picture, there is no pictures, just the word image...will the code above fix it?

dpk
10-06-2007, 10:54 PM
thanks! this works very well.