Well, in javascript, å ä ö would be \u00E5 \u00E4 \u00F6

http://rishida.net/tools/conversion/

Perhaps something like this would work:

<script type="text/javascript">
var title="{title}";
title.replace("Ã¥", "\u00E5");
title.replace("ä", "\u00E4");
title.replace("ö", "\u00F6");
document.title = title;
</script>

been some time since I last coded javascript, so there might be some errors... And I'm not sure how the chars (åäö) are in the {title}, or if it works at all https://cutephp.com/forum/style_emoticons/default/biggrin.gif

You could try the php version, see if it works

https://cutephp.com/forum/index.php?showtopic=31743

You could try adding

session_save_path(realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/../session'));


in top of the php file that has your include code, after the session_start(); that was added in the hack... A bit of a long shot, but it seems your session aren't really being stored in the right directory (in your case, /tmp is where is trying to save it)... A php.ini problem, might not be so fun to solve, hopefully the above will help...  https://cutephp.com/forum/style_emoticons/default/mellow.gif

If the above does not work, and if you have access to your server files, you can look around in the php folder to see if there is a tmp folder, and what is it permission settings...

remove the blank line and problem should be solved https://cutephp.com/forum/style_emoticons/default/smile.gif

What's line 2 of beta/news/index.php? BOM would be line 0, if I recall correcly (or could be line 1)

Um... How doesn't it work? Does it give out an error? Or nothing happens? What cutenews version you have?

Dear Support_Team

Perhaps this will help you understand better how this is related to Cutenews

The pages aren't shown, I click on page two but there is nothing in it https://cutephp.com/forum/style_emoticons/default/sad.gif

Page 1:

http://galaxyneo.ueuo.com/

Page 2:

http://galaxyneo.ueuo.com/index.php?start_...n=&amp;id=&amp;

How to solve?  https://cutephp.com/forum/style_emoticons/default/unsure.gif

The links broken though

Well, don't replace this

echo "<title>".$title."".$cat." My Site Title</title>\n";


but only this

echo "<title>My default title</title>\n";


Perhaps replacing above with

if (isset($_GET['start_from'])) echo "<title>My Site Page: ".$page_number."</title>\n";
else echo "<title>My Site</title>\n";


would work best for you

and here's a bit improved code

if (isset($_GET['start_from']) && $_GET['start_from'] != '0') {
$number = '6';
$page_number = $_GET['start_from'] / $number + 1;}
else $page_number = 1;
if (isset($_GET['start_from'])) {
$number = 'What number you use in your include';
$page_number = floor($_GET['start_from'] / $number);}
else $page_number = 1;

https://cutephp.com/forum/style_emoticons/default/biggrin.gif (too long break from coding it seems)

and val4o0o0, be sure to replace that "What number you use in your include" with what $number you use in your news include https://cutephp.com/forum/style_emoticons/default/smile.gif

Hmm... Easiest way would most likely be to add this

if (isset($_GET($start_from))) {
$number = 'What number you use in your include';
$page_number = floor($_GET($start_from) / $number);}
else $page_number = 1;


after the frst line (<?PHP), and then use

echo "<title>My Site ".$title." Page: ".$page_number."</title>\n";


for My Site Title Page: 2 format

Ofc, I suck at this, so I could be wrong

I wonder how long it will take to get this cool new "feature" up and running... I have a feeling that the official cutenews will never be as good as UTF-8... Or even at the same level. They will most likely "steal" some code from UTF, but I'm not that convinced (yet) of the official teams php skill...

https://cutephp.com/forum/index.php?showtopic=31597

ah, I was lazy and just read the first and the last (solution) post, and figured this was only a pagin (url) problem

*useless pondering* Wonder why it's REQUEST instead of GET...

Here's something that's using id too...
http://www.virtualhockeyassociation.com/vh...ampage.php?id=1

Ofc we already knew something else is using id, I just wanted to show what https://cutephp.com/forum/style_emoticons/default/smile.gif

What a useful feature for your common everyday users... https://cutephp.com/forum/style_emoticons/default/smile.gif

Do you have anything else planned? Something like improved security or performance? Or is SVN your only goal at the moment?

And I don't really mean to sound like a broken record, but... Do you have any plans for us "unofficial support" members? (I'm not really expedting an answer, but I have to try https://cutephp.com/forum/style_emoticons/default/smile.gif)

42

(61 replies, posted in News)

we will soon release a feedback form that will allow all users to contact our support team for professional assistance in all of matters related to our project.

Cool! Cutenews will finaly get a forum where people can get support! No wait...  https://cutephp.com/forum/style_emoticons/default/unsure.gif

43

(61 replies, posted in News)

I love how the license still says that everything belongs to Flexer https://cutephp.com/forum/style_emoticons/default/biggrin.gif Actually this whole thing is quite hilarious, out of nowhere we get a new version with pretty much false prosimes... Oh well... Atleast the version number went up 0.0.1 https://cutephp.com/forum/style_emoticons/default/biggrin.gif

in my opinion that upgrade is more like announcing a new keypad mobile while everyone is already using capacitive touchscreen

More like Microsoft announcing there is a new update on Windows 95... https://cutephp.com/forum/style_emoticons/default/wink.gif

What was Flexer thinking adding those watermarks to cutnews...  https://cutephp.com/forum/style_emoticons/default/h.gif

It feels like being back in school again  https://cutephp.com/forum/style_emoticons/default/tongue.gif

If HTML and the Web made all the online documents look like one huge book, RDF, schema, and inference languages will make all the data in the world look like one huge database

Name: Word filer for comments
Author: Ifa
CuteNews Compatibility: 1.3.6 - * (no incompatibility reported yet)
Description: This is a simple word filter. It replaces words of your choice with * (a with *, ab with **, abc with *** and so on)
Instructions:

First make a filter.txt into your cutenews folder, and add the words you want to list, like this:
word1
word2
word3

After that, inc/shows.inc.php and find line 535 (v1.4.6),

$output = replace_comment("show", $output);


Between it and

echo $output;

add this:

$file = str_replace(array("\r\n", "\r"), "\n", file_get_contents('filter.txt'));
$wordfilter = explode("\n", $file);
foreach ($wordfilter as $word) $output = str_ireplace($word, str_repeat("*", strlen($word)), $output);

This alternative code shows the first and the last letter, ie abcd -> a**d

$file = str_replace(array("\r\n", "\r"), "\n", file_get_contents('filter.txt'));
$wordfilter = explode("\n", $file);
foreach ($wordfilter as $word) $output = str_ireplace($word, substr($word, 0).str_repeat("*", strlen($word) - 2).substr($word, -1), $output);

These are case insensitive, so no need to worry about upper and lowercases
Note that this only edits the output, it's doesn't affect the comment saving. So in comment.txt the words are still unsensored

I might be wrong about this, but isn't

rsort($arch_arr);
$arch_arr = array_reverse($arch_arr);

The same as

sort($arch_arr);

As first you sort the array in reversed order with rsort, and then you reverse it again with array_reverse... So it's a reversed rsort, the same as sort https://cutephp.com/forum/style_emoticons/default/smile.gif

Might be some issues in using someone elses code and adding a copyright to it and selling it https://cutephp.com/forum/style_emoticons/default/smile.gif (along with cutenews, I mean) https://cutephp.com/forum/style_emoticons/default/smile.gif

Hack Name:  Spam protection with asking three random chars from a random string of chars.
Description: From 10 random letters, people will have to count what letterls the spam protection is asking for (it asks for 3 letters). In example from abcdefghij, one must count first, seventh and fourth char (agd). What char is must be given, is also randomized. 
Author: Ifa

Find

 if($comments == ""){
            echo("<div style=\"text-align: center;\">Sorry but the comment can not be blank
[url=]go back[/url]</div>");
                        $CN_HALT = TRUE;
                        break 1;
    }

And add below it

$pass = FALSE;
    if (htmlentities($_POST['letters'], ENT_QUOTES, 'UTF-8'))
        {
            $letters = str_split(substr(htmlentities($_POST['letters'], ENT_QUOTES, 'UTF-8'), 0, 3));
            print_r($letters);
            $random_letters = str_split(htmlentities($_POST['cba'], ENT_QUOTES, 'UTF-8'));
            $order = str_split(htmlentities($_POST['abc'], ENT_QUOTES, 'UTF-8'));
            
            foreach ($order as $key => $check)
                {
                    if ($random_letters[$check] == $letters[$key]) $pass = TRUE;
                    else
                        {
                            $pass = FALSE;
                            break;
                        }
                }
        }
    if (!$pass)
        {
            echo("<div style=\"text-align: center;\">Spam protection check failed, 
[url=]go back[/url]</div>");
            $CN_HALT = TRUE;
            break 1;
        }

Find

$template_form = str_replace("{smilies}", $smilies_form, $template_form);

    echo"<form  $CN_remember_form  method=\"post\" name=\"comment\" id=\"comment\" action=\"\">".$template_form."<div><input type=\"hidden\" name=\"subaction\" value=\"addcomment\" /><input type=\"hidden\" name=\"ucat\" value=\"$ucat\" /><input type=\"hidden\" name=\"show\" value=\"$show\" />$user_post_query</div></form>
                    \n $CN_remember_include";

And replace it with

function r_letters($nc, $a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0')
                            {
                                $l = strlen($a) - 1;
                                $r = '';
                                while($nc-->0) $r .= $a{mt_rand(0,$l)};
                                return $r;
                            }
    $words_array = array ('first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eight', 'ninth', 'tenth');
    $first = $words_array[mt_rand (0, 9)];
    $second = $words_array[mt_rand (0, 9)];
    $third = $words_array[mt_rand (0, 9)];
    $random_letters = r_letters(10);            
    
    $template_form = str_replace("{r-letters}", $random_letters, $template_form);
    $template_form = str_replace("{letter-input}", "<input type=\"text\" name=\"letters\" />",$template_form);
    $template_form = str_replace("{first}", $first ,$template_form);
    $template_form = str_replace("{second}", $second ,$template_form);
    $template_form = str_replace("{third}", $third ,$template_form);
    $template_form = str_replace("{smilies}", $smilies_form, $template_form);
    echo"<form  $CN_remember_form  method=\"post\" name=\"comment\" id=\"comment\" action=\"\">".$template_form."<div><input type=\"hidden\" name=\"subaction\" value=\"addcomment\" /><input type=\"hidden\" name=\"ucat\" value=\"$ucat\" /><input type=\"hidden\" name=\"show\" value=\"$show\" />$user_post_query
    <input type=\"hidden\" name=\"cba\" value=\"".$random_letters."\" /><input type=\"hidden\" name=\"abc\" value=\"".array_search($first, $words_array).array_search($second, $words_array).array_search($third, $words_array)."\" />
    </div></form>\n $CN_remember_include";

Now, in your Add comment form template, you can use the following:
{r-letters} - shows 10 randomly generated letters.
{letter-input} - the text field where users type the 3 letters
{first}, {second} and {third} will output witch letters users should type (ie Please type the {first}, the {second} and the {third} letter)

Name: Mod-Rewrite
Author: FI-DD & Ifa
CuteNews Compatibility: 1.3.6 - 1.4.1
Description: Here is two versions of mod rewrites. The mod_rewrite2.txt is the original Mod Rewrite v2 by FI-DD, and the mod_rewrite2mod.txt is the same, with small modifications by me. The original gives you a url of "post/news-title-like-this.html" as for mine, its "post/category/news-title-like-this-newsid.html
Discussion Topic: here & here
Instructions:

My version can have two articles of the same name, but the original might have a problem with it. But if you don't mind not having articles with the same names, I recommend the original version.

Both files come with good instructions on how to install the hack.

[Edit by StealthEye]
Since some people were having trouble downloading the attachments, I uploaded them somewhere else:
http://www.xs4all.nl/~cvdtak/mod_rewrite2.txt FI-DD
http://www.xs4all.nl/~cvdtak/mod_rewrite2mod.txt Ifa

Posts found: 26 to 50 of 58

Pages Previous 1 2 3 Next

CutePHP Forums → Posts by Ifa



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