[Burichan] [Futaba] [Kusabax]  -  [WT]  [Home] [Manage]

Posting mode: Reply
Subject   (reply to 5181)
Password  (for post and file deletion)
  • Supported file types are: GIF, JPG, PNG
  • Maximum file size allowed is 1000 KB.
  • Images greater than 200x200 pixels will be thumbnailed.
  • Currently 1307 unique user posts. View catalog

No. 5181 ID: 8baf03
Hi, i would like to ask how could i make the board remember 'noko', so the user doesn't have to type it in every post.

Also, after the upgrade the board still shows kusaba x 0.9 version, does this mean the upgrade didnt work?

Thanks in advance.
>> No. 5183 ID: 069cd8
I was just going to ask this. Thanks for doing it for me.

The email & name fields are remembered just fine, but when noko is entered it is 'forgotten'.
>> No. 5188 ID: 0d40c4
There's a line in board.php which causes noko and sage to not be remembered. Edit it.

If you want to reflect the update to 0.9.1, update KU_VERSION in config.php
>> No. 5195 ID: 6c9970
Thank you very much!!!
>> No. 5314 ID: 48200f
How did you fix it, i can't find the line?
>> No. 5318 ID: 48200f
>> No. 5323 ID: 48200f
>> No. 5332 ID: 48200f
>> No. 5336 ID: e803ad
help plz
>> No. 5346 ID: b6b3a2
>> No. 5421 ID: 23f9a8
bump this:

Hi, i would like to ask how could i make the board remember 'noko', so the user doesn't have to type it in every post.
>> No. 5423 ID: 88a30c

in board.php there is

if (strtolower($_POST['em']) != 'sage' && $ords_email != array(19979, 12370) && strtolower($_POST['em']) != 'age' && $ords_email != array(19978, 12370) && $_POST['em'] != 'return' && $_POST['em'] != 'noko') {
$post['email_save'] = true;
} else {
$post['email_save'] = false;

last "false" prevents noko / sage to be saved. replace it with true.
>> No. 5427 ID: 86693d
thank you very very much!
>> No. 5428 ID: 86693d
Sorry to bother but even after that it doesn't work.
>> No. 5429 ID: 86693d
Could it be a cookie problem?
>> No. 5442 ID: 069cd8
I did this too, I tried on the latest versions of Firefox & IE, yet sage & noko refuse to save.

I think there is a javascript you can enter into the actual coding for the input boxes for email & name, that allows you to save the text entered.... this would just be a workaround of course...
>> No. 5449 ID: 8938d6
i think i could manually make it create a cookie for that, seems a bit more elegant
>> No. 5455 ID: 8938d6
Sage seems to share the same function and sage works ok... Will investigate.
>> No. 5469 ID: 069cd8
Yeah that's really odd. sage is remembered perfectly, but noko isn't...
>> No. 5471 ID: 5899ef
Noko is also erased in /inc/classes/posting.class.php
>> No. 5491 ID: ea3adc
Thanks Harrison, i was at the uni yesterday and unable test it.

At this point of /inc/classes/posting.class.php
(line 212):

function GetFields() {
/* Fetch and process the name, email, and subject fields from the post data */
$post_name = isset($_POST['name']) ? htmlspecialchars($_POST['name'], ENT_QUOTES) : '';
$post_email = isset($_POST['em']) ? str_replace('"', '', strip_tags($_POST['em'])) : '';
/* If the user used a software function, don't store it in the database */
if ($post_email == 'return' || $post_email == 'noko') $post_email = '';
$post_subject = isset($_POST['subject']) ? htmlspecialchars($_POST['subject'], ENT_QUOTES) : '';

return array($post_name, $post_email, $post_subject);


i replaced $post_email = '';
with $post_email = 'noko';
it seems to work ok!

Could it be possible to add this somewhere to the wiki? It would save many people that lack php knowledge (like myself) from having a headache. :)
>> No. 5494 ID: 5899ef
Simpler way would have been just to delete that line.
>> No. 5703 ID: 069cd8
That's one solution. It just kinda irks me that the poster name turns into a different color; for its recognized as an email, and not separately treated as noko. I'll deal with it though!
>> No. 6066 ID: 25b515
This. Shouldn't we be able to fix this easily? Like find the line where it makes emails an "<a>" tag and be like WELL IF IT'S NOKO THEN WELL FUCK THAT.
>> No. 6067 ID: 25b515
After posting this I did a search on all the files for "mailto", and it seems this will have to be done via editing of the templates. (template if statements ftw.)
>> No. 6068 ID: 25b515
Ultimate solution:
Follow other solutions in this thread. The ones on Board.php and the Posting class page.

Go through templates, and find this statement:
"{if $post.email && $board.anonymous}"
And change them to:
"{if $post.email neq '' && $post.email neq 'noko' && $board.anonymous}"

The best way to do this is open all the files locally or remotely(via FTP plugin) in Notepad++ or some other type of editor and do a find&replace search.

Delete post []
Report post