1

(1 replies, posted in Hacks & Tricks / FAQ)

Name: ipban exploit fix
Author: FI-DD
CuteNews Compatibility: 1.3.6 - * (no incompatibility reported yet)
Description: Notes by FUNimations: There seems to be a exploit in CuteNews that can only be abused by admin users. Though i don't understand how this exploit works, FI-DD believes that the following should fix the problem.
(lKj): This flaw (among others) is already fixed in UTF-8 CuteNews. No altering files necessary!
Discussion Topic: <strike>here</strike>
Instructions:

In inc/ipban.mdu find this:

if(!$add_ip){ msg("error","Error !!!","The IP can not be blank", "$PHP_SELF?mod=ipban"); }

and add below:

elseif(!preg_match("/^[0-9*]{1,3}\.[0-9*]{1,3}\.[0-9*]{1,3}\.[0-9*]{1,3}$/", $add_ip)){
     die("That's not a valid IP.");
}

Find this:

//Rename image
if ($action == 'rename' and $image and $name){

and add below:

$name = str_replace(" ", "_", $name);

I replace the spaces during the upload process.

Spaces in the file name shouldn't be a problem because spaces are replaced with underscores (around line 213):

$image_name = str_replace(" ", "_", $image_name);

1. What's the image name and the thumb name before renaming it?

2. What the image name and the thumb name after renaming it?


I have no idea. Normally, there aren't any problems with this hack as it only replaces the original images.mdu. Don't know what's wrong.  https://cutephp.com/forum/style_emoticons/default/sad.gif


Change the path until it works:
$dir = opendir("data/watermark");

Try $dir = opendir("./data/watermark"); for example.


hi,
Is there any way to sort images by date instead to be sort by name ??


http://english.cutenews.ru/forum/picture-a...-t729.html#4048

sweet! I see that you have a paypal button too


Oh, right. I forgot about it 'cause nobody clicked it. https://cutephp.com/forum/style_emoticons/default/wink.gif


* forgot to ask: Is this module compatible with the latest version of cutenews?


Yes.


who do I have to pay to get the image system revamped?


Me.  https://cutephp.com/forum/style_emoticons/default/smile.gif

http://democute.de.funpic.de/cute/example2...rom=&amp;ucat=6

Because that one doesn't work https://cutephp.com/forum/style_emoticons/default/wink.gif


What's not working? Why is nobody complaining?

Edit: Oh, the download is not working. Thanks for pointing it out. I'll try to fix it.
Edit2: Working now. https://cutephp.com/forum/style_emoticons/default/smile.gif


What surprises me is the fact that the latest version has only 2 downloads.  https://cutephp.com/forum/style_emoticons/default/blink.gif

In contrast, the file upload hack has almost 2.800 downloads.

it's still cool i'd love to see it get integrated with some way to auto make a smaller .jpg or .gif that linked to the larger image


That's exactly what it does.


anyone got it up other than fi-dd so i can see it in use?


It's an admin tool - so it will look the same. And I doubt anybody will allow you to use their admin panel to see it in action.

$images_per_page = 999999999;    https://cutephp.com/forum/style_emoticons/default/cool.gif


some suggestions:
a detailed readme.txt (i have no idea what to do with the watermark option)


Fortunately, we have the internet where one can find information within seconds.  https://cutephp.com/forum/style_emoticons/default/wink.gif

http://www.google.de/search?hl=en&amp;q=watermark+image
http://en.wikipedia.org/wiki/Watermark

Name: Mod Rewrite
Author: FI-DD
CuteNews Compatibility: 1.3.6 - * (no incompatibility reported yet)
Description: The following hack is my approach to create search engine friendly urls using mod_rewrite.
The big advantage of my code is its very easy and fast way of installing it.
Compared to other solutions which needed editing of lots of code you can install/uninstall my hack in less than a minute.
V1: The hack will produce urls like path_to_cute/post/8273645283-2.html (full story link) or path_to_cute/postpage/3.html
V2: For example: "This is my news title" will show as yourdomain.com/this-is-my-news-title.html
Requirements: Your server must support mod_rewrite and .htaccess files to get this working.
Demo: http://www.weirdnews.co.nr
Discussion Topic: here
Download: Download page

When you go to your news page for the first time the script should create the .htaccess file and change the look of the urls as explained above.

You module will not work with wysig editior turned on. it wont even work if i check view source.

Well, of course I tested it with wysiwyg turned on and it was working fine for me. I'm afraid, I can't help you. https://cutephp.com/forum/style_emoticons/default/sad.gif


also!! whats a true type font??

That's a font file (.ttf). Check out c:\windows\fonts on your computer and you will find a lot of them.


and do i upload a gif water mark yes?

Gif, jpg and png images should work.


Update Version 3.0:
- Watermark (text)
- Watermark (image)
- Create thumbs for already existing images.
- Fixed the image path bug (hopefully).

You can download it in the first post or here.

Another feature requested: the possibility to create thumbnails of images without them.
I usually do this: upload my images directory via ftp in the "\data\upimages" dir.
Then I want to pick those images and insert them in an article to create a sort of gallery.


Open images.mdu and find this:

foreach ($images_in_dir as $file) {


   
add below:

    //Add missing thumbs
    if(!file_exists($config_path_image_upload.'/thumbs/'.$file))
    make_thumb($config_path_image_upload.'/'.$file, $config_path_image_upload.'/thumbs/'.$file, '150', 'normal');
    //Add missing thumbs


You can use the avatar for that.
I made a little hack some time ago which makes it possible to select an avatar through the image module.


Put it directly in the short story/full story.  https://cutephp.com/forum/style_emoticons/default/smile.gif


The included images.mdu works with 1.4.1 if you use example1.php or example2.php or if your news page is in the same folder as those two example files.

If your news page is outside the main cutenews folder (as in your case) it only works with the fix.

And I was just wondering if there is a way to make the thumbnail appear in a different column to the news?

i.e.
column 1 - show thumbnail
column 2 - show news item

Whereas at the moment when you click "insert image" the only option is to insert it into the news item itself. Whereas a 2 column layout would look much neater.


What about this:

<table>
<tr>
<td>image</td>
<td>text</td>
</tr>
</table>



Thumb Path Not Correct on my News Page

I'm having a problem getting the image to display with the Advanced Image improvement. It's all good except for the path that gets generated on my news page.
I get a broken thumbnail:


Please read this very thread. The solution is in here.


In images.mdu delete this: window.close();


I don't understand the problem. If you want to change the image path you do this in index.php.  https://cutephp.com/forum/style_emoticons/default/blink.gif


Open index.php and change the image path:
$config_path_image_upload        = "./data/upimages";

Posts found: 1 to 25 of 66

Pages 1 2 3 Next

CutePHP Forums → Posts by FI-DD



The pun_antispam official extension is installed. Copyright © 2003–2009 PunBB.