1 (edited by 2008-11-17 20:20:03)

Topic: Advanced image module for CuteNews

There was an error with multiple uploads. The previous version uploaded only 2 images. I corrected it.

Please replace the old file with the updated file.

>>Download<<

Re: Advanced image module for CuteNews

Oh my god dude, hehe - What can I say, fantastic work  https://cutephp.com/forum/style_emoticons/default/cool.gif

Minus the use of the GDLib, I had got mine showing previews of the images from within the main admin section and a few other bits 'n' bobs but nothing like what you have done here.

I say again, simply fantastic. Thank you very much  https://cutephp.com/forum/style_emoticons/default/biggrin.gif

3 (edited by 2005-11-04 22:50:55)

Re: Advanced image module for CuteNews

Ahh, one very tiny problem... Don't worry, it is a tiny one  https://cutephp.com/forum/style_emoticons/default/wink.gif

Everything works mint except when I insert a clickable thumb as it seems to miss a bit out of the inserted URL. Here, let me show you an example.

The correct URL to the image is: http://www.whatever.com/CuteNews/data/u … /image.jpg

However, this is what I get: http://www.whatever.com/data/upimages/image.jpg

Notice how the 'CuteNews' directory is missing? - Any ideas?

The code for the thumbnail image link that is inserted into either short/full story is:

[url=.]<img border="0" align="none" alt="" src="http://www.whatever.com/CuteNews/data/upimages/thumbs/image.jpg">[/url]

It needs to be:

[url=h]<img border="0" align="none" alt="" src="http://www.whatever.com/CuteNews/data/upimages/thumbs/image.jpg">[/url]

***EDIT***

P.S.
I have noticed that if I preview the news that I am posting from within the main CuteNews posting screen/page the link to the full picture works (as it looks like the seconf chunk of code I have pasted here). However, once I have published said news the link does as I said above and misses the 'CuteNews' directory out...

Please help  https://cutephp.com/forum/style_emoticons/default/wink.gif

Re: Advanced image module for CuteNews

Everything works mint except when I insert a clickable thumb as it seems to miss a bit out of the inserted URL.


Right, it worked when using the wysiwyg editor. But without it the href was too short.

I fixed it. Download the latest version from the first post.

Re: Advanced image module for CuteNews

Hey FI-DD, thank you for all your hard work here. This mod is simply fantastic  https://cutephp.com/forum/style_emoticons/default/cool.gif

Now, to get it so that I can choose <div align="left">, <div align="center">, or <div align="right"> from a button within short/full story hehe.

Thanks again.

P.S.
The attachments are from my 'images.mdu' file.

Re: Advanced image module for CuteNews

Now, to get it so that I can choose <div align="left">, <div align="center">, or <div align="right"> from a button within short/full story hehe.


I don't completely understand. What do you mean exactly?

And can you send me the code for the buttons as seen in your screenshots? I'm too lazy to make it myself.  https://cutephp.com/forum/style_emoticons/default/rolleyes.gif

Thanks.

7 (edited by 2005-11-05 15:12:30)

Re: Advanced image module for CuteNews

Well when I post images in my news they are aligned to the left all the time so I end up manually adding a <div align="center"> around the HTML for the images to keep everything looking nice.

Just thought it would be cool if you could choose to align to either left, center, or right when inserting the picture; or as per my thoughts, more simply have 3 new 'QuickTags' for each of the <div> tags. You get the idea  https://cutephp.com/forum/style_emoticons/default/wink.gif

To have buttons rather than text links replace the following chuncks of code.

Change this:

                <td height=16 width=15%>
                [url="][Insert image][/url]
                <td height=16 width=15%>
                [url="][Insert thumb][/url] 
                <td height=16 width=15%>
                [url="][Insert clickable thumb][/url]

To this:

                <td height=16 width=15%>
                <input type=button value=\"Insert Image\" onClick=\"javascript:insertimage('$file', '$path_big', '$empty_link', '$empty_link')\"> 
                <td height=16 width=15%>
                <input type=button value=\"Insert Thumb\" onClick=\"javascript:insertimage('$file', '$path_thumb', '$empty_link', '$empty_link')\"> 
                <td height=16 width=15%>
                <input type=button value=\"Clickable Thumb\" onClick=\"javascript:insertimage('$file', '$path_thumb', '$link1', '$link2')\"> 

I also changed your original CSS to match the one I have for my site too.

Change this (if you want to of course):

                        select, option, textarea, input {

                         BORDER: #808080 1px solid;

                         COLOR: #000000;

                         FONT-SIZE: 11px;

                         FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff

                        }

To this:

                        input, select, option {
                        BORDER-RIGHT: #808080 1px solid;
                        BORDER-TOP: #808080 1px solid;
                        BORDER-BOTTOM: #808080 1px solid;
                        BORDER-LEFT: #808080 1px solid;
                        COLOR: #000000;
                        FONT-SIZE: 9px;
                        FONT-FAMILY: Verdana; }

                        textarea {
                        BORDER-RIGHT: #808080 1px solid;
                        BORDER-TOP: #808080 1px solid;
                        BORDER-BOTTOM: #808080 1px solid;
                        BORDER-LEFT: #808080 1px solid;
                        COLOR: #000000;
                        FONT-SIZE: 11px;
                        FONT-FAMILY: Verdana; BACKGROUND-COLOR: #ffffff }

Just a thought here, but I have a php script that takes a directory of images and not only creates a thumb with the GDLib but also adds a rather nice drop shadow effect (using a number of user defined .png files) to the newly created thumbnail too. Maybe this could be a little upgrade for your mod  https://cutephp.com/forum/style_emoticons/default/wink.gif

I can supply all of the code needed to do this if you need it as to be honest you would have more luck than me adding it to your already supurb code  https://cutephp.com/forum/style_emoticons/default/biggrin.gif

Included are some pics of what it actually does. Image2.jpg was created by the script from Image1.jpg on the fly. The cool thing is that the thumbs are only created once too so no hogging of resources on future page visits etc... If that was not enough, the background colour can also be specified during creation too so that it will fit with your design.

P.S.
Yup thats me while Caving in the Peaks - Handsome young thing arnt I LOL  https://cutephp.com/forum/style_emoticons/default/laugh.gif

Re: Advanced image module for CuteNews

Well when I post images in my news they are aligned to the left all the time so I end up manually adding a <div align="center"> around the HTML for the images to keep everything looking nice.

When adding an image in addnews you have the image properties. Isn't that what you need?

To have buttons rather than text links replace the following chuncks of code.

The button will be added to the code. Thanks for that.

Just a thought here, but I have a php script that takes a directory of images and not only creates a thumb with the GDLib but also adds a rather nice drop shadow effect (using a number of user defined .png files) to the newly created thumbnail too. Maybe this could be a little upgrade for your mod  https://cutephp.com/forum/style_emoticons/default/wink.gif


Please send me the script. I'll try to add it.

Thank you.   https://cutephp.com/forum/style_emoticons/default/smile.gif

9 (edited by 2005-11-05 21:55:49)

Re: Advanced image module for CuteNews

It would be cool if the clickable thumb opened a pop up of the image in a window with the exact dimensions of the image. One of those javascript things. just a little suggestion. This is a great mod though! I really like it.

Re: Advanced image module for CuteNews

If you are after a media pop-up script there is a very nice javascript one here at http://www.mcweb.com.au/index.php?page=blo...8&amp;archive=20046

Re: Advanced image module for CuteNews

I just tried that out and i must say very nice! I have played with the GDLib thingo before and must say its a bit of a bum 2 use at times.

I noticed some stupid problems on window server.. that some thumbnails wouldnt show as the image only had admin read rights and stupid stuff like that.

Re: Advanced image module for CuteNews

CuteNews v1.4.1's images.mdu file has exactly this "window to size of image" function. However, not amount of 'playing' with the code is working for me...

Need to try and add this function to the following bit of code:

                $my_area = str_replace("_", " ", $area);
                $path_big = "";
                $path_thumb = "thumbs/";
                $link1 = htmlspecialchars('<a target="_blank" href="'.$config_http_script_dir.'/data/upimages/'.$file.'">');
                $link2 = '</a>';
                $empty_link = "";

                echo"
                <tr $bg><td height=16 width=10% align=center>[url=""]<img height='50px' style='border:0px;' src=".$config_path_image_upload."/thumbs/".$file.">[/url]
                <td height=16 width=15%>  [url=""]$file[/url]

Re: Advanced image module for CuteNews

nice addon https://cutephp.com/forum/style_emoticons/default/smile.gif
one thing.. trying to add multiple images will not work
use the wysiwyg editor. add one image ok, try to add another and the previous is replaced

Re: Advanced image module for CuteNews


Thank you.  https://cutephp.com/forum/style_emoticons/default/smile.gif

Will be fixed in the next update.

Re: Advanced image module for CuteNews


I added the possibility to rename images and to open the images in a popup. Popups in the Cutenews image manager are nothing new. But I made it also for the page you are showing the images on, and I made it optional.

Creating thumbs with a dropshadow will be added shortly.  https://cutephp.com/forum/style_emoticons/default/smile.gif

Re: Advanced image module for CuteNews

Problem here... Whew, I found myself posting just problems https://cutephp.com/forum/style_emoticons/default/sad.gif

Anyway, if you insert image and drag it somewhere inside textarea, image url loses /cutenews part

Correct url should be

domain.com/cutenews/data/upimages/image.jpg

but it somehow became

domain.com/data/upimages/image.jpg (notice lost of /cutenews)

I noticed the same thing after editing article. Any help?

Re: Advanced image module for CuteNews


Sorry, I don't have this bug neither in the original image module nor in my modified version.

Do you have the error in the demo?

https://cutephp.com/cutenews/demo/

Re: Advanced image module for CuteNews

Hummm, everything is working like a charm (like it is working on my page) but the problem is in output file. Everything is displayed properly in cutenews, but I have problem when displaying published article.
It seems that I can't do that from demo. Is there a way to see that article published?

Oh, BTW - maybe problem is in aligning? I always choose right or left then click on picture.

19 (edited by 2005-11-08 12:04:20)

Re: Advanced image module for CuteNews

Hi there FI-DD, I have a fine chunk of code to add a drop shadow to the created thumbs if you need it  https://cutephp.com/forum/style_emoticons/default/biggrin.gif also, the problem vanja seems to have sounds like that that I had... However, since you fixed how it inserts the code for CuteNews v1.3.6 (rather than CuteNews v1.4.1 with the BBCode editor) it has worked like a charm for me.

It is daft to think that I (and a load of other people) have wanted these features for so long that they have not been added to the new version of CuteNews.

Anyway, the code is there if you want it matey.

P.S.
The drop shadow colour can be changed to suit too so it will fit with your design  https://cutephp.com/forum/style_emoticons/default/wink.gif This is the reason I use 8 .png files for the drop shadow effect. Add to this, it does not need to be a drop shadow! - You could change the files to give you a nice picture frame effect or anything else you want.

I basically use 8 files to cover the topleft corner, top, topright corner, right, bottomright corner, bottom, bottomleft corner, and finally the left side of the thumbnail.

20 (edited by 2005-11-08 12:34:15)

Re: Advanced image module for CuteNews

When adding an image in addnews you have the image properties. Isn't that what you need?
The button will be added to the code. Thanks for that.


Please send me the script. I'll try to add it.

Thank you.   https://cutephp.com/forum/style_emoticons/default/smile.gif

Opps, missed your post... Doh. Anyway, new PM on its way to you with a link to download the code from my web server.

Hope its what you wanted. And thanks for adding my 'button code'  https://cutephp.com/forum/style_emoticons/default/biggrin.gif

Ok, in the 'Image Properties' section before you upload an image this simply adds align="whatever...", what I am wanting is so that I have buttons to add <div align="center"> image code here etc... </div>.

Hope that is clear.

21 (edited by 2005-11-08 16:51:30)

Re: Advanced image module for CuteNews

Thank you for your PM FI-DD, the code is just what I need. However, I think it would be a lot easier if I just edited the 'Quick-Tags' to include the <div=....> tag.

You know the one:

  
QuickTags   
   Insert Link  [link=URL]Text[/link]  
   Insert Image  [image=URL]  
   Instert Quote  [quote=Name]Text[/quote]  
   Insert List  [list][*]Text1[*]Text2[/list]  
   Bold Text  [b]Text[/b]  
   Italic Text  [i]Text[/i]  
   Underlined Text  [u]Text[/u]  
   Text Color  [color=COLOR]Text[/color]  
   Text Size  [size=SIZE]Text[/size]  
   Text Font  [font=FONT]Text[/font]  
   Text Align  [align=ALIGN]Text[/align]  

What file in CuteNews do I need to edit to either alter the default QuickTags or add my own?

Re: Advanced image module for CuteNews

What file in CuteNews do I need to edit to either alter the default QuickTags or add my own?


about.mdu  https://cutephp.com/forum/style_emoticons/default/smile.gif

Re: Advanced image module for CuteNews

Thanks, I have simply edited the above file to include the following code:

        case 'center':
            code = '<div align=\"center\">' +var1+ '</div>';
            break;

and...

    <tr ><td height=16 width=\"21\">
     
    <td height=16 width=\"344\">
    [url=]
    Insert Div Tag[/url]
    <td height=16 width=\"0\">
    [center][/center]
    </tr>

I can now simply insert a <div align="center"></div> tag whenever I want, this is all I wanted. However, the BBCode buttons of CuteNews.RU are bloody nice hehe. I might have to see if I can add them to my copy of CuteNews (copyrights permitting of course hehe)..

Again, thank you for your help  https://cutephp.com/forum/style_emoticons/default/wink.gif

Re: Advanced image module for CuteNews

When looking at the functions.inc.php file near the end there is a few bbcodes that i have never really noticed that could be used.

Re: Advanced image module for CuteNews

Thanks JetSki but I have sorted it  https://cutephp.com/forum/style_emoticons/default/wink.gif  - FI-DD, any news on when you will be updating the download link to include the drop shadow effect we discussed (and tested)?

Posts: 1 to 25 of 426

Pages 1 2 3 18 Next

You must login or register to post a reply

CutePHP Forums → Script Feedback and Suggestion → Advanced image module for CuteNews