Join us on Discord!
You can help CodeWalrus stay online by donating here.

General site updates, TODO list and discussion

Started by Dream of Omnimaga, November 12, 2014, 07:18:29 AM

Previous topic - Next topic

0 Members and 110 Guests are viewing this topic.

Dream of Omnimaga

  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

p2

that stuff was outdated even before I was born...  <_<

but still I like the idea of having a special mobile site without images :)
even tho it's probably pretty uncool to kill any css  :ninja:
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Dream of Omnimaga

It uses some minimal CSS actually. I guess overall our current mobile theme can do the job, even though it has some bugs. I can't wait to see what SMF 2.1 has in store in terms of responsiveness.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

p2

I was trying to change the title of my reply to Topic #87 when I realized that the current name was already 2 letters OVER the regular maximum title length (I guess you guys modded the database there again).
Could we maybe change the max length globally?
It should be a rather simple config file in clear text, @Sorunome should know where to look for it (hopefully) :)
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Sorunome

Quote from: p2 on February 13, 2017, 10:12:02 AM
I was trying to change the title of my reply to Topic #87 when I realized that the current name was already 2 letters OVER the regular maximum title length (I guess you guys modded the database there again).
Could we maybe change the max length globally?
It should be a rather simple config file in clear text, @Sorunome should know where to look for it (hopefully) :)
You will probably have to also modify the DB to allow more chars for that column in VARCHAR, and these limits are usually hardcoded into SMF but rather simple to find.
  • Calculators owned: Too many (why are you even reading this?)
  • Consoles, mobile devices and vintage computers owned: Gamebuino!
This is a signature.
And now......give me an internet!

To be or not to be.........is that even a question? Who gets to decide this anyways?

Dream of Omnimaga

Yeah we didn't change anything, but maybe something happened when editing. The lenght can be altered IIRC, as demonstrated on Omni once, but it might glitch out.

Also I updated the front page description of the site to include more platforms and more release examples
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Yuki

You can edit the max length in the HTML, I think the PHP makes no check on that until it's thrown in the SQL.
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Dream of Omnimaga

#937
Ah ok. I remember when this was attempted on Omni, some HTML tags were not parsed properly everywhere, though.

EDIT: I installed a mod to allow searching for single characters words. Now C programmers should be able to search for C SDK-related posts. However, to prevent server overload, I increased the search limit to 5 seconds instead of 2 (I'll set it to 10 if I notice any lag). Thanks @MateoConLechuga for notifying me of the issue
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

p2

We should fix the mail notification thingy :)

QuoteHello p2!

DJ Omnimaga mentioned you in the post "Juju, you have been mentioned at a post in CodeWalrus", you can view the post at *link*

Regards,
CodeWalrus
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Dream of Omnimaga

#939
We can't. I notified the author about the issue, to no avail (it appears he hasn't updated the mod since 2014). Unless someone in our team knows enough PHP/SMF modding to do it? Or maybe Soru could help? :P

http://www.simplemachines.org/community/index.php?topic=522005.msg3748982#msg3748982

When I brought that post back up, I got told that the mod was last modified in May 2014, and since the bug was reported in Sept 2014, it's unlikely this mod will ever get updated again.


Thankfully, SMF 2.1 probably has this feature by default.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Sorunome

#940
file Mentions.php
Find

function mentions_process_store(array $mentions, $id_post, $subject, $approved = true)
{
        global $smcFunc, $txt, $user_info, $scripturl;

        foreach ($mentions as $mention)
        {
                // Store this quickly
                $smcFunc['db_insert']('replace',
                        '{db_prefix}log_mentions',
                        array('id_post' => 'int', 'id_member' => 'int', 'id_mentioned' => 'int', 'time' => 'int'),
                        array($id_post, $user_info['id'], $mention['id'], time()),
                        array('id_post', 'id_member', 'id_mentioned')
                );

                if (!empty($mention['email_mentions']) && $approved)
                {
                        $replacements = array(
                                'POSTNAME' => $subject,
                                'MENTIONNAME' => $mention['real_name'],
                                'MEMBERNAME' => $user_info['name'],
                                'POSTLINK' => $scripturl . '?msg=' . $id_post,
                        );

                        loadLanguage('Mentions');

                        $subject = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
                        $body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
                        sendmail($mention['email_address'], $subject, $body);
                }

                if ($approved)
                        updateMemberData($mention['id'], array('unread_mentions' => $mention['unread_mentions'] + 1));
        }
}


replace with


function mentions_process_store(array $mentions, $id_post, $subject, $approved = true)
{
        global $smcFunc, $txt, $user_info, $scripturl;

        foreach ($mentions as $mention)
        {
                // Store this quickly
                $smcFunc['db_insert']('replace',
                        '{db_prefix}log_mentions',
                        array('id_post' => 'int', 'id_member' => 'int', 'id_mentioned' => 'int', 'time' => 'int'),
                        array($id_post, $user_info['id'], $mention['id'], time()),
                        array('id_post', 'id_member', 'id_mentioned')
                );

                if (!empty($mention['email_mentions']) && $approved)
                {
                        $replacements = array(
                                'POSTNAME' => $subject,
                                'MENTIONNAME' => $mention['real_name'],
                                'MEMBERNAME' => $user_info['name'],
                                'POSTLINK' => $scripturl . '?msg=' . $id_post,
                        );

                        loadLanguage('Mentions');

                        $subject_email = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
                        $body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
                        sendmail($mention['email_address'], $subject_email, $body);
                }

                if ($approved)
                        updateMemberData($mention['id'], array('unread_mentions' => $mention['unread_mentions'] + 1));
        }
}



EDIT: the spaces are because i copypasted out of nano :P

EDIT2: Disclaimer: I didn't test this but the fix is IMO so obvious that it shouldn't need testing :P Just a variable name collision with the variable $subject

EDIT3: the modified lines are line 261 and 263
  • Calculators owned: Too many (why are you even reading this?)
  • Consoles, mobile devices and vintage computers owned: Gamebuino!
This is a signature.
And now......give me an internet!

To be or not to be.........is that even a question? Who gets to decide this anyways?

Dream of Omnimaga

Hm we might want to uninstall the mod and apply this change to the mod itself before reinstalled the updated version, though, so we avoid editing the SMF code directly. Thanks for the fix, though. Do you plan to cross-post this in the SMF Mentions thread on the official support site?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Sorunome

Since the changed file is a file the mod only added itself it still uninstalls clean.

I do not plan on posting it there because i'm lazy >.>
  • Calculators owned: Too many (why are you even reading this?)
  • Consoles, mobile devices and vintage computers owned: Gamebuino!
This is a signature.
And now......give me an internet!

To be or not to be.........is that even a question? Who gets to decide this anyways?

novenary

I've applied it and it seems to be working fine. Thanks.

aetios

Sorunome for prez, lol. Fixes more issues in a night than all of us in a year :P
ceci n'est pas une signature

Powered by EzPortal