Forgot?

Ninja Super Submit (beta)

Reply Topic
Link to this post 05 Jun 08

Hi,
I was really worried about finding an easier way for users to submit content than the standard joomla way. Finding NJ Super Submit was brilliant. The demo looks like exactly what I need.

I've installed NJ Super Submit (latest version) on a joomla 1.0.15 test site. ButI'm having a couple of issues...

I'm only seeing the Intro Text input box. No main article box.
And don't have the save and cancel icons that are on your demo.
Tried a few different templates for the joomla site but same thing each time. Looked up and down the configuration for NJ Super Submit but con't see anthing that would control this...

Ive also noticed that if the user fails to select a category and section that they are not notified about that. The article then just gets submitted as Static Content. Would prefer to stop the user from submitting without category/section selected..

When trying to submit with an image, if the image is not one of the allowed types or is bigger than the allowed filesize then the submit just doesn't happen. Think it would be good to give the user a message to say why it didn't happen.

I am a bit confused about a couple of things....

I see on the config page the option to Resize Images ? but I am not sure how this is supposed to work? if the user is stopped from loading a larger image.. then how can the resize get to work?
Also is there a library or something that needs to be installed to make the resizing work?

Lastly, what is the Notify By Email for? Is that to notify me when a user has submitted content? If so is there a way to put a default email address in there rather than requiring the user to input it every time?

Thanks
Vida

Link to this post 05 Jun 08

Oh, sorry.. just figured out that Simple Mode hides the main text area.
So thats one thing off the list.
Apologies if I wasted anyones time there...

Vida

Link to this post 05 Jun 08

One more thing,
When I submit content with an image in the Main Text, the image does not display.. just a little box with the word Image in it...

HTH
Vida

Link to this post 05 Jun 08

Looking at the code in the ninja_super_submit.php file I have found this:

//introtext image
$Nameimage1 = $_FILES['image1']['name'];
$Nameimage2 = $_FILES['image2']['name'];
if ($_POST['caption1'] != '') {
$row->images="users/".$Nameimage1."|right||1|".$_POST['caption1']."|bottom||";
} else
{
$row->images="users/".$Nameimage1."|right||1||";
}
$addmos = "{mosimage}";
if ($Nameimage1!=""){
$row->introtext=$addmos.$row->introtext;
}


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

if ($Nameimage2!=""){
$row->fulltext=$addmos.$row->fulltext;
}

Looks like the link for the main text image is missing a $_POST[ ] Would that be right?

Thanks
Vida

Link to this post 05 Jun 08

Hi vidapura, Thanks for the suggestions and questions.

I will pass the questions onto the developer, but you could you please put the suggestions into the Feature Request page. You can find it under the Extension Club menu.

p.s. for finding what does indeed look like a bug I have given you a silver membership.

Link to this post 06 Jun 08

Well thanks you very much for the silver membership!
Much appreciated.

By the way, I fixed this main text image problem.
I noticed that it only occurs if the user adds a main image and does not add an intro image.

So I changed the code to deal with this situation.

I have attached the file to this post. (as a .txt file cos forum forbids attaching .php files...)

The code I changed is commented in the file, but its as follows:

//Vidas Changes start here ============================================================
//introtext image
$Nameimage1 = $_FILES['image1']['name'];
$Nameimage2 = $_FILES['image2']['name'];
$addmos = "{mosimage}";
if ($Nameimage1!=""){

if ($_POST['caption1'] != '') {
$row->images="users/".$Nameimage1."|right||1|".$_POST['caption1']."|bottom||";
} else
{
$row->images="users/".$Nameimage1."|right||1||";
}


$row->introtext=$addmos.$row->introtext;
}


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

$row->fulltext=$addmos.$row->fulltext;
}

// Vidas changes end here ============================================================== [file name=ninja_super_submit.txt size=15126]http://www.ninjoomla.com/media/kunena/attachments/legacy/files/ninja_super_submit.txt[/file]

Link to this post 07 Jun 08

Thanks again vidapura,

You have inspired us to start a new policy of giving free memberships and upgrades to people who find a bug and give a solution for it. ;)

Link to this post 07 Jun 08

thanks Vida,

i will implement your fix this weekend and upload, i will also take a look at the other issues you have found

im hoping these wont be a problem in the new version im working on, but i will try to fix these before its release

Link to this post 09 Jun 08

Hi RavenLife,
Happy to help. Basically fixed it cos am under pressure to get a site up and running.
When do you think you'll have the new version up and running?

Also, could I ask for a little bit of advice?
I find tht on the Tiny MCE or JCE editors there is a lot of buttons (for italics, bolding, etc etc) which boggles these non-techie users of mine... is there a way to hide specific buttons ? Rather than just hiding the whole pane?
I know you guys dont' make these components .. but thought you might know a bit about it...

Thanks
Vida

Link to this post 09 Jun 08

Hey!
Just noticed that I'm now a GOLD member??
Excellent! Thanks!
Can I volunteer for any beta testing needed to be done on Super Submit too?
I have a real need for that extension so if there's anything I can do to help it out the door then please let me know...
Thanks
Vida

Link to this post 09 Jun 08

Fixed another problem with Super Submit there....
The save image wasn't being displayed.

Its just missing an 'echo'...
so the code
<!-- COMMENT OUT IF YOU WANT THE DEFAULT TOOLBAR -->
<div id="toolsave"><a href="javascript:submitbutton('save');">
<img src="<?php $mosConfig_live_site;?>/components/com_ninja_super_submit/images/save.png" alt="save" title="save"/>
</a></div>

Needs to become:

<div id="toolsave"><a href="javascript:submitbutton('save');">
<img src="<?php echo $mosConfig_live_site;?>/components/com_ninja_super_submit/images/save.png" alt="save" title="save"/>
</a></div>

Best Regards,
Vida

Link to this post 10 Jun 08

thanks again vida,

when i have the next version at beta (im sort of rewriting it) i will give you a shout for you to play around with it

Link to this post 11 Jun 08

hi there,

is the first fix for the fake images already integrated to the new version of super submit? i checked for super submit in the (free-)download section but the files date from april 4th.
where can i get the latest version of super submit for joomla 1.1.15 or is it only available for silver/gold members?

kind regards
tyrannski

Link to this post 11 Jun 08

Hi Tyrannski,

I have just uploaded a new version of this - it is still free.

all vida's fixes have been implemented, however updates will be slow unless critical as i am in the process of creating the new version of SS, which will be "completely" rewritten, have lots more options and implement all the suggestions i have had thus far, plus a few more i want :)

Richie

Link to this post 12 Jun 08

thank you, richie.

it's already a great component, but i'm excited to see the new version. all options and features will be so great.

tyrannski

Link to this post 12 Jun 08

yes it is a massive thing,

gets bigger everytime i mention it to the team, everyone thinks of something they want content submission todo ;)

which means i have the biggest ever feature list ive worked with to date

all fun stuff though :)

Link to this post 16 Jun 08

Hey RavenLife,
Qucik question, the new version that you are working on.. will it be just for joomla 1.5 ? Or will it work with 1.0.15 ?
Thanks
Vida

Link to this post 16 Jun 08

Hi Vida,

What Richie is working on is a super top secret extension!

Well not so much super secret, but rather not finalised yet.

But it will be J1.5 initially. that much is finalised.

Link to this post 16 Jun 08

Hi Daniel,
Just wanted to see if I should wait for it.
But there's no point in doing that if its for J1.5 as my site is 1.0.15
So, I'll just have to go and fix the validation/static content bug myself. Good to know the situation at least.

Thanks
Vida

Link to this post 18 Jun 08

Probably best not to wait. But if you make any significant and useful changes Super or Simple Submit let us know and we will swap you a membership upgrade or something else of value to you for a copy of them.

Link to this post 18 Jun 08

Hi Daniel,
I'm very grateful for the gold membership I already have,
What I'd prefer to get is some assistance in fixing the things I've found problems with.
I'm under real pressure to get a site delivered and the easy frontend submission of articles is whats holding me up.

Yesterday I found two more problems:

Mixed case filenames in the images are getting lowercased when uploaded, while the link to them retains the mixed case filename.
So the images are not showing when the article is displayed.

Also, (and this is where I really don't know where to start or what file to edit..) in the backend/administrator page there is something funny going on with the auto-approve selection of users and categories. If I select multiple users to autosubmit then the list of categories gets reset, and vice versa if I select multiple autosubmit categories..

I'm still struggling to fix the user input validation problems with a user being allowed to submit an article with no category selected (and so ending up with a static content submission) and the problem with a user being allowed to submit an article with a blank subject (which means the article can't be edited in the backend cos it can't be selected)

I'm having a real hard time fixing the category not selected problem so if anyone has time to look at that with me I'd really appreciate it...

Apologies if I appear a bit ignorant about this stuff.. I'm trying to learn php and read the joomla module developement docs at the same time as trying to get this module fixed.. its all a bit new to me..

If anyone could advise me as to what would be a good development environment to use for this stuff it would be agreat help too.. is there any free IDE that I can use for PHP? Can I load joomla into it and the module? If I could debug through it rather than just reading the code in textpad I imagine things will go a bit quicker..
Thanks,
Vida

Link to this post 19 Jun 08

Nope it's not ignorance.

These are things we weren't aware of, but are definitely should do something about.

I have notified Richie, the developer, again so he should pop in soon to get you sorted out.

Link to this post 19 Jun 08

Ok, grand,
In the meantime I managed to kinda fix the input validation...
For some reason the javascript function submitbutton wasn't getting called.. maybe a name conflict with something being included or something.. so I changed the name to ninjasubmitbutton.

Then it started working..

After that I realised the code to check the current value of the SELECT for the sections couldn't work... for two reasons.. one cos it was trying to access the value the same way you'd access a textfield.. and two because the html code produced by that mosHTML::selectList function doesn't include an id attribute...

The html produced by the call to mosHTML::selectList looks like this:

<select name="sectionid" class="inputbox" size="1" onchange="changeDynaList( 'catid', sectionCat, this.options[this.selectedIndex].value, 0, 0);">
<option value="nj0" id="nj0">Select Section</option>
<option value="nj5" id="nj5">Access Control</option>
<option value="nj1" id="nj1">News</option>

</select>

so it creates the select with a Name of sectionid .. but no id of sectionid... odd, dunno much about this stuff but.. looks like a bug ??

Ok, so the category select does appear to have an id attribute so I'm just checking that instead.
The function as it works for me is as follows:

function ninjasubmitbutton(pressbutton){
var form = document.adminForm;
if (pressbutton == \'cancel\'){
submitform( pressbutton );
return;
}

// var goodexit=false;
// assemble the images back into one field
form.goodexit.value=1;
// do field validation

/*if ( form.sectionid.value == "NA" || form.sectionid.value == "-1" ) {
alert ( "'._COM_ERR_CHOOSE_SECTION.'" );
}
else */

if ( form.catid.options[form.catid.selectedIndex].value == "nj-1" || form.catid.value == "-1" ) {
alert ( "'._COM_ERR_CHOOSE_CAT.'" );
}
else if ( form.created_by_alias.value == "" ) {
alert ( "'._COM_ENTER_NAME.'" );
}
else if ( ( form.email.value == "" ) || ( form.email.value.search("@") == -1 ) || ( form.email.value.search("[.*]" ) == -1 ) ) {
alert ( "'._COM_ENTER_EMAIL.'" );
}
else if ( form.title.value == "" ) {
alert ( "'._COM_ENTER_TITLE.'" );
}
else {
submitform(pressbutton);
}
}

Link to this post 19 Jun 08

Hi Vida,

i am working on these now - will let you know when i have a new version up.

again thanks for the input

Link to this post 23 Jun 08

Thats great news.. will try to get around to trying it out today some time.. have to actually work today.. sigh...

heh heh
Vida

Link to this post 23 Jun 08

thanks vida,

do let me know if you find any issues, and i can get them cleared up

RIchie

Link to this post 23 Jun 08

Will do... but it will be tonight or tomorrow night..
My boss is back from holidays and I can't get a minute to myself...

Vida

Link to this post 24 Jun 08

Ok,
For anyone coing late to this thread, from now on I'll put my comments on the latest version of this component on this thread:
http://www.ninjoomla.com/index.php?option=com_kunena&amp;Itemid=39&amp;func=view&amp;catid=2&amp;id=4676#4676

Vida.

Home Forum General General Discussion Ninja Super Submit (beta)