Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Image Uploader
Philip
Posted on 13 May 2009, 11:07:25

Access: Member
Total Posts: 10
Joined: 2009-05-13

This script is amazing and does everything, but what about an image uploader?

There does not seem to be any function to upload and insert images.

any help?


thanks Cris for this great script.
#537
Atomxy
Posted on 13 May 2009, 15:36:08

Access: Member
Total Posts: 12
Joined: 2009-05-12

Hello... :tongue:

I think this is not a hard task... :)

You'll just need to find a file uploader script, configure it, and make a integration with admin panel.

:smile:

I'll do this in my website, and when everything is ready, i can post here. :smile:

I'm sorry, but now i don't have any time to do this. :frown:

I hope that you find a solution. :smile:
#543
Last edited by Atomxy at 2009-05-13 15:36:37 Reason:
Philip
Posted on 15 May 2009, 16:39:59

Access: Member
Total Posts: 10
Joined: 2009-05-13

thanks for your reply,

i have TinyMCE editor with an upload manager integrated and i try to combine with Network-13 News but with no feature...

if you can help when you will have some time it would be very helpful.

thanks a lot.
#548
Atomxy
Posted on 15 May 2009, 23:10:05

Access: Member
Total Posts: 12
Joined: 2009-05-12

Hello again Philip

You are the first one that has replied a post since I have signed up in this forum. Where are the users?

Try to download a simple uploader manager, install in your server.
To integrate the script with admin panel, you just need to edit admin.php file, find a place inside the “Add News” form, and place a link to other script, you can put your uploader script to open in a pop-up window, so you can easy upload your files inside the admin panel, when you are posting.

To make the uploader script add a link in the “Story” or “Short Story” form, you’ll need to add a javascript system, and interact then with PHP. Your PHP script need to send a variable to javascript, this variable will contain the link to the uploaded image, and tags [image]link here[/image]. I’m sorry, but I’m not sure how to interact PHP with javascript to do this, but I have other solution, make your uploader script show a link with the tags, like this:

Code:
[img]your link here[/img]

First try to put the link in a variable, named $imagelink, for example.

And do this…

Code:
<?php
$linktoforum = '[img]'.$imagelink.'[/img]';
echo $linktoforum
?>

The script will show
Code:
[img]your link here[/img]
, and you’ll need only to copy/paste inside your form.

To put the link in a variable I’ll need to analyze the upload script.

Bye bye. :)

Edit.

Edit.

This forum has a srcript that do exactly what we want… :D

Try to click in the Image icon.

:)

Code:
<script language="javascript">
function inserturl(){
var c = '[img]' + document.getElementById('url').value + '[/img]';
opener.document.getElementById('msg').value += '\n' + c;
self
}
function insertimage(url){
opener.document.getElementById('msg').value += '\n' + url
if(document.getElementById('close').checked){
self.close();
}
}
</script>

This script get the variable url, from element id 'url', and add the tags img, and put the link in other opened document, in this line:

Code:
opener.document.getElementById('msg').value += '\n' + url

Try to adjust this to use in your news. :)

If you need more help reply this message. :)

#549
Last edited by Atomxy at 2009-05-15 23:22:38 Reason:
Philip
Posted on 21 May 2009, 14:34:02

Access: Member
Total Posts: 10
Joined: 2009-05-13

thank you very-very much for your help....

#558
Network-13.com © 2013