Giter Site home page Giter Site logo

simplemachines / smf Goto Github PK

View Code? Open in Web Editor NEW
575.0 73.0 250.0 59.8 MB

Simple Machines Forum — SMF in short — is free and open-source community forum software, delivering professional grade features in a package that allows you to set up your own online community within minutes!

Home Page: https://www.simplemachines.org/

License: Other

PHP 94.42% CSS 1.53% JavaScript 3.22% PLpgSQL 0.82%
smf php forum mysql mysqli postgresql bsd-3-clause simplemachines simplemachinesforum

smf's Introduction

Build Status CrowdIn Status

This the development repository for Simple Machines Forum. The software is licensed under BSD 3-clause license.

Contributions to documentation are licensed under CC-by-SA 3. Third party libraries or sets of images are under their own licenses.

Notes:

Feel free to fork this repository and make your desired changes.

Please see the Developer's Certificate of Origin in the repository: by signing off your contributions, you acknowledge that you can and do license your submissions under the license of the project.

Branches organization:

  • release-2.1 - is the branch where updates for version 2.1 are applied

How to contribute:

  • fork the repository. If you are not used to Github, please check out fork a repository.
  • branch your repository, to commit the desired changes.
  • sign-off your commits, to acknowledge your submission under the license of the project.
    • It is enough to include in your commit comment "Signed-off by: " followed by your name and email address (for example: Signed-off-by: Your Name <[email protected]>)
    • an easy way to do so is to define an alias for the git commit command, which includes -s switch (reference: How to create Git aliases)
  • send a pull request to us.

How to submit a pull request:

  • If you want to send a bug fix for version 2.1, send it to the branch release-2.1

Security matters:

Lastly, if you have a security issue you would like to notify us about regarding SMF - not just for 2.1, but for any version - please file a security report on our website: https://www.simplemachines.org/about/smf/security.php

This will enable the team to review it and prepare patches as appropriate before exploits are widely known, which helps keep everyone safe.

smf's People

Contributors

albertlast avatar angelinabelle avatar arantor avatar brickozp avatar colinschoen avatar diegoandrescortes avatar dragomano avatar dragooon avatar emanuele45 avatar fearthe1337 avatar frandominguezl avatar gwenwyfar avatar illori avatar jdarwood007 avatar live627 avatar margarett avatar missallsunday avatar mistervector avatar nanosector avatar norv avatar oldiesmann avatar sbulen avatar sesquipedalian avatar sga-oscar-rydhe avatar spuds avatar sycho9 avatar tinoest avatar tyrsson avatar underdog-01 avatar xinyenfon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smf's Issues

tabindex post screen

The textarea created by the editor doesn't inherit the tabindex value of the "real" textarea.

Don't allow multiple variations of the same gmail address

GMail, unlike many other providers, allows you to format your email address using dots - [email protected] is exactly the same address as "[email protected]", though SMF doesn't think so.

I have seen several instances of spammers registering multiple accounts using multiple variations of the same address.

Unfortunately, I'm not sure it's easy to do this as we'd have to do a WHERE STR_REPLACE(".", "", email_address) (or something similar) in the DB query, and I don't know if it's very efficient to do that, especially on large forums.

Cookies and Sessions page?

Was looking at the Cookies and Sessions settings page, it breaks style with all the other pages, what do you all think about moving the random comments like

(SSI wont work well on this)

(enable subdomain independent cookies first!
The domain could be for example: "website.com" or "website.co.uk" without http:// or slashes)

to the help file and accessing them by clicking the ?.

Drafts doesn't seem to auto save.

I set the drafts auto save to 60 seconds, made a new topic and waited a few minutes however no auto save. Didn't seem to auto save, and when I navigated away it didn't have a draft in the show drafts section.

Tokens and edit others profiles

  • end the admin session (since we can now, it's easier :P)
  • edit someone else's profile
  • save
  • insert the admin password
  • token verification failed

Disable DB session by default ?

The default option to save session to DB cause issues with alternative php session handlers, notably redis (and most probably memcached). Indeed it prevents users from accessing their session (or at least returns something which is invalid), which in turn results in the inability to logout or access the administration screen.

The issue do not happen when the default php seesion handler is set to files.

Hooks passing by ref

Before PHP 5.4, referenced variables were passed to the function by reference, regardless of whether the function expects the respective parameter to be passed by reference. This form of call-time pass by reference did not emit a deprecation notice, even though it was deprecated, and has been removed in PHP 5.4.

So I suggest all variables passed through call_integration_hook are done by value. Removing the ampersand in front of the var.

Lastly, I'll note that some poorly written plugins will break. But they already break in 5.4, so this argument is invalid.

Signature Settings

On the signature settings page, you can "click here" to apply rules to current signatures.

Throughout SMF we have no "click here" to do anything, instead in the maintenance areas it will use buttons with "Run now", we should for consistency make this the same.

Also there is no green verification that the action is complete, as with other actions.

$context['current_pm'] error

When you are in PM conversation mode (haven't checked, but condition is -> if ($context['display_mode'] == 2) so I would guess so) ... and you have no PM, $context['current_pm'] gives two errors on line #865 & #866 in PersonalMessage.php

Profile User Information Display Bug

Problem:

Found this a couple days ago after editing my forum profile fields for testing purposes. After adding information to all the fields except the IM ones, a display bug appears on the profile summary page, where the "Show Posts" link is aligned to the right. I believe this to be caused by the icon list above not having a height due to the floated list elements contained in it.

problem

Fields Edited:

  • Avatar
  • Personal Text
  • Birthday
  • Location
  • Gender
  • Custom Title
  • Signature
  • Website Title
  • Website URL

Browser:
Chromium Version 23.0.1271.95 Fuduntu (169798)

Proposed Fix:

First, I'd suggest changing the order of elements so that the online status is above the other icons UL, and also to add a clearing break to it.

Profile.template.php : Find

    // Display the basic information about the user
    echo '
<div class="cat_bar">
    <h3 class="catbg">
        <img src="', $settings['images_url'], '/icons/profile_hd.png" alt="" class="icon" />', $txt['summary'], '
    </h3>
</div>
<div id="profileview" class="flow_auto">
    <div id="basicinfo">
        <div class="windowbg">
            <div class="content flow_auto">
                <div class="username"><h4>', $context['member']['name'], ' <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4></div>
                ', $context['member']['avatar']['image'], '
                <ul class="reset">';
    // @TODO fix the <ul> when no fields are visible
    // What about if we allow email only via the forum??
    if ($context['member']['show_email'] === 'yes' || $context['member']['show_email'] === 'no_through_forum' || $context['member']['show_email'] === 'yes_permission_override' && $context['can_send_email'])
        echo '
                    <li><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '" title="', $context['member']['show_email'] == 'yes' || $context['member']['show_email'] == 'yes_permission_override' ? $context['member']['email'] : '', '" rel="nofollow"><img src="', $settings['images_url'], '/email_sm.png" alt="', $txt['email'], '" class="centericon" /></a></li>';

    // Don't show an icon if they haven't specified a website.
    if ($context['member']['website']['url'] !== '' && !isset($context['disabled_fields']['website']))
        echo '
                    <li><a href="', $context['member']['website']['url'], '" title="' . $context['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.png" alt="' . $context['member']['website']['title'] . '" class="centericon" />' : $txt['www']), '</a></li>';

    // Are there any custom profile fields for the summary?
    if (!empty($context['custom_fields']))
    {
        foreach ($context['custom_fields'] as $field)
            if (($field['placement'] == 1 || empty($field['output_html'])) && !empty($field['value']))
                echo '
                    <li class="custom_field">', $field['output_html'], '</li>';
    }

    echo '
                ', !isset($context['disabled_fields']['icq']) && !empty($context['member']['icq']['link']) ? '<li>' . $context['member']['icq']['link'] . '</li>' : '', '
                ', !isset($context['disabled_fields']['msn']) && !empty($context['member']['msn']['link']) ? '<li>' . $context['member']['msn']['link'] . '</li>' : '', '
                ', !isset($context['disabled_fields']['aim']) && !empty($context['member']['aim']['link']) ? '<li>' . $context['member']['aim']['link'] . '</li>' : '', '
                ', !isset($context['disabled_fields']['yim']) && !empty($context['member']['yim']['link']) ? '<li>' . $context['member']['yim']['link'] . '</li>' : '', '
            </ul>
            <span id="userstatus">', $context['can_send_pm'] ? '<a href="' . $context['member']['online']['href'] . '" title="' . $context['member']['online']['text'] . '" rel="nofollow">' : '', $settings['use_image_buttons'] ? '<img src="' . $context['member']['online']['image_href'] . '" alt="' . $context['member']['online']['text'] . '" class="centericon" />' : $context['member']['online']['label'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $context['member']['online']['label'] . '</span>' : '';

Replace:

    echo '
<div class="cat_bar">
    <h3 class="catbg">
        <img src="', $settings['images_url'], '/icons/profile_hd.png" alt="" class="icon" />', $txt['summary'], '
    </h3>
</div>
<div id="profileview" class="flow_auto">
    <div id="basicinfo">
        <div class="windowbg">
            <div class="content flow_auto">
                <div class="username"><h4>', $context['member']['name'], ' <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4></div>
                ', $context['member']['avatar']['image'], '
                <span id="userstatus">', $context['can_send_pm'] ? '<a href="' . $context['member']['online']['href'] . '" title="' . $context['member']['online']['text'] . '" rel="nofollow">' : '', $settings['use_image_buttons'] ? '<img src="' . $context['member']['online']['image_href'] . '" alt="' . $context['member']['online']['text'] . '" class="centericon" />' : $context['member']['online']['label'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $context['member']['online']['label'] . '</span>' : '', '
                <ul class="reset">';
    // @TODO fix the <ul> when no fields are visible
    // What about if we allow email only via the forum??
    if ($context['member']['show_email'] === 'yes' || $context['member']['show_email'] === 'no_through_forum' || $context['member']['show_email'] === 'yes_permission_override' && $context['can_send_email'])
        echo '
                    <li><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '" title="', $context['member']['show_email'] == 'yes' || $context['member']['show_email'] == 'yes_permission_override' ? $context['member']['email'] : '', '" rel="nofollow"><img src="', $settings['images_url'], '/email_sm.png" alt="', $txt['email'], '" class="centericon" /></a></li>';

    // Don't show an icon if they haven't specified a website.
    if ($context['member']['website']['url'] !== '' && !isset($context['disabled_fields']['website']))
        echo '
                    <li><a href="', $context['member']['website']['url'], '" title="' . $context['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.png" alt="' . $context['member']['website']['title'] . '" class="centericon" />' : $txt['www']), '</a></li>';

    // Are there any custom profile fields for the summary?
    if (!empty($context['custom_fields']))
    {
        foreach ($context['custom_fields'] as $field)
            if (($field['placement'] == 1 || empty($field['output_html'])) && !empty($field['value']))
                echo '
                    <li class="custom_field">', $field['output_html'], '</li>';
    }

    echo '
                ', !isset($context['disabled_fields']['icq']) && !empty($context['member']['icq']['link']) ? '<li>' . $context['member']['icq']['link'] . '</li>' : '', '
                ', !isset($context['disabled_fields']['msn']) && !empty($context['member']['msn']['link']) ? '<li>' . $context['member']['msn']['link'] . '</li>' : '', '
                ', !isset($context['disabled_fields']['aim']) && !empty($context['member']['aim']['link']) ? '<li>' . $context['member']['aim']['link'] . '</li>' : '', '
                ', !isset($context['disabled_fields']['yim']) && !empty($context['member']['yim']['link']) ? '<li>' . $context['member']['yim']['link'] . '</li>' : '', '
                <br class="clear" />
            </ul>';

That will get things in the right order, but there still needs to be a slight CSS adjustment to get the margins right.

index.css : Find

#basicinfo ul {
    list-style-type: none;
    margin: 10px 0 0 0;
}
#basicinfo ul li {
    display: block;
    float: left;
    margin-right: 5px;
    height: 20px;
}
#basicinfo#userstatus {
    display: block;
    clear: both;
}

Replace

#basicinfo ul {
    list-style-type: none;
    margin: 5px 0 0 0;
}
#basicinfo ul li {
    display: block;
    float: left;
    margin-right: 5px;
    height: 20px;
}
#basicinfo #userstatus {
    display: block;
    clear: both;
    margin-top: 5px;
}

Result:
fix

Error log issues on visiting every admin page

Some error log reports from visiting each page:

Invalid argument supplied for foreach()
File: /Users/graemespence/Sites/SMF2.1/SMF2.1/Sources/Subs-List.php
Line: 112
http://localhost/~graemespence/SMF2.1/SMF2.1/index.php?action=admin;area=languages;sa=add;c38ed7fc3a6a=6ca0f475f35ffa58c6b1032fe48b286f
(Tried to search for "English British")


 File: /Users/graemespence/Sites/SMF2.1/SMF2.1/Themes/default/languages/Drafts.english.php (showDrafts sub template - eval?)

Line: 460
Invalid argument supplied for foreach()
http://localhost/~graemespence/SMF2.1/SMF2.1/index.php?action=profile;area=showdrafts;u=1

05-11-2012 installation

IE9:
When you are on step 2 in the installation, there's no 'Continue' button.. well it's hidden in a div that is hidden.
Unhide it, and you can continue installation.

PostgreSQL Native Fulltext Search

It might be a bit late in the development to implement this, but it's definitely something we should consider. As of version 9.0, PostgreSQL has native support for full text searching.

From the original entry on Mantis ( http://dev.simplemachines.org/mantis/view.php?id=4657 ) :

On a moderately large forum, the custom search index does not work well -- it literally takes weeks
to construct, and the resulting index is an order of magnitude larger than the original messages,
and takes so long to search that just doing a brute search can have better performance. It would
greatly benefit Postgresql database users to have a native full text search index (documentation
here http://www.postgresql.org/docs/9.0/static/textsearch.html)

SMF News in Mod CP

It's a tad bit long, not a big issue but it is definitely an eye sore for those who use that part of the ModCP.

access manage attachments could be impossible

Due to a recent issue at sm.org, me, CoreISP and @The-Craw find out that in certain cases this bit of code can make the server very sad:

    // Everything is okay so far, start to scan through the directory.
    $num_files = 0;
    $dir_handle = dir($dir);
    while ($file = $dir_handle->read())
    {
        // Now do we have a real file here?
        if (in_array($file, array('.', '..', '.htaccess', 'index.php')))
            continue;

        $num_files++;
    }
    $dir_handle->close();

This is used to count the attachments in each and every attachments directory at once without take any break for a coffee.

A way to pause the count and continue later would be nice I think.

Smiley Settings not setting default

Admin -> Forum -> Smileys and Message Icons

Click Modify on any of the sets, try and set it as the default set using the checkbox. Doesn't seem to work.

Workaround is use the settings tab.

integrate_default_action

@norv

In order to not lose Norv's comment on the integrate_default_action I open this issue.
If it is not necessary feel free to close it. ;)

A bit of reference:
#212 (comment) (Norv's comment)
#52 (original discussion about the hook)

I'm not sure if the comment was about the general idea of the hook or about my last commit in particular.

The reasoning behind my last commit is: there are already few other hooks that expect a return, the previous way was a bit fragile because we were expecting the mod to set $call to a string. The way I changed it now we know that what we are examining in the loop is an array (returned by call_integration_hook), then the first valid function is used to generate the homepage.

TBH, no I didn't test it.

All theme files not copied over

Creating a copy of default theme through ACP does not copy all relative css files or the relative paths are not found resulting in Admin & Post bit being messed up.

Example: admin.css & jquery.sceditor.css

05-11-2012 profile

action=profile
Throws this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR ((62 BETWEEN bi.ip_low1 AND bi.ip_high1)
AND (107 BETWEEN bi.ip_low2 AND b' at line 5
File: /home/www/mysite.com/Sources/Profile-View.php
Line: 150

    // So... are they banned?  Dying to know!
    $request = $smcFunc['db_query']('', '
        SELECT bg.id_ban_group, bg.name, bg.cannot_access, bg.cannot_post, bg.cannot_register,
            bg.cannot_login, bg.reason
        FROM {db_prefix}ban_items AS bi
            INNER JOIN {db_prefix}ban_groups AS bg ON (bg.id_ban_group = bi.id_ban_group AND (bg.expire_time IS NULL OR bg.expire_time > {int:time}))
        WHERE (' . implode(' OR ', $ban_query) . ')',
        $ban_query_vars
    );

It is apparently only an issue in the frontpage of the profile.

WYSIWYG: missing features / bugs

the wysiwyg is nice in general but two features are IMHO important have been wiped out:

  1. the button-status isn't updated anymore, thus you don't knwo the current selected formattings..
  2. the toggle button to switch between wysiwyg and non-wysiwyg mode

MSN -> Skype

As per some preliminary team discussion, Microsoft Live Messenger should be replaced with Skype support. Microsoft has stated that they are retiring Live Messenger and trying to redirect MSN LM users to Skype.

Skype's API for reference: https://developer.skype.com/skype-uri/skype-uri-tutorial-webpages

As per their API, it is possible to link the Skype username with one of multiple operations - Shift Focus, Video Call, Audio Call, Chat.

05-11-2012 installation - messageindex

Clean installation:

The message index shows a blank page with the error:
Fatal error: Call-time pass-by-reference has been removed; If you would like to pass argument by reference, modify the declaration of call_integration_hook(). in /home/www/mysite.com/Sources/MessageIndex.php on line 680
#678 // Allow adding new buttons easily.
#679 // Note: $context['normal_buttons'] is added for backward compatibility with 2.0, but is deprecated and should not be used
#680 call_integration_hook('integrate_messageindex_buttons', &$context['normal_buttons']);

Fatal Error: Call Time Reference

I get this on the forum message index. As of PHP 4, call time reference passing is illegal. Unfortunately, making a call_integration_hook() argument a reference may have unintended consequences.

Fatal error: Call-time pass-by-reference has been removed; If you would like to pass argument by reference, modify the declaration of call_integration_hook(). in /opt/lampp/htdocs/SMF2.1/Sources/MessageIndex.php on line 665

Cache Get Data - L1 Cache Error

In latest nightly build when i try to enable cache level 1 i get this error.

8: Undefined variable: value - Load.php (Line: 2802)

if (function_exists('call_integration_hook'))
    call_integration_hook('cache_get_data', array($key, $ttl, $value));

Responsive theme

Hey everyone, this is my first post on github :)

Anyway, I have a suggestion - SMFs default theme to be responsive.

We all know that Responsive web design is the best way to handle support for various screen sizes.

By the way, I could help with front-end development.
Can someone tell me - is there a specified design for SMF 2.1? Can I make a suggestion?

Add a CONTRIBUTING file

I noticed we have confusion over how to contribute to the SMF code. It seems like we could do something to make this easier.

First,
https://github.com/blog/1184-contributing-guidelines

This seems like a good idea and could help clear up questions and problems with how to contribute to the code.

Secondly,
If master is not going to be our development branch, we should set the development branch as our default branch. This can be done via the admin area.

SQLite compatibility

SMF 2.0 is only supports officially SQLite 2.8.
SQLite 3.x is backwards incompatible (or not guaranteed) with 2.x.
The standard PHP driver for SQLite 3.x is the PDO driver. Which SMF 2.0 database layer does not support.

So the question is: are we going to implement SQLite 3.x support for 2.1, or just fix 2.8?
My previous answer: support 3.x in any next version of SMF.

Notes:
2.x is extremely outdated. (this is an understatement)
3.x is almost certainly on the hosts supporting SQLite.
Once a database is migrated to 3.x, one cannot go back.
They both can be installed in parallel and work side by side on a server. SQLite has designed its 3.x so that it has different functions to create/open/work with a database, to enable that.
SMF uses the SQLite 2 functions, i.e. install.php first lines: sqlite_open()
http://www.php.net/manual/en/function.sqlite-open.php

(PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
This function only support database of SQLite 2 or below. For SQLite 3, you must use PDO.

Ref:
http://www.php.net/manual/en/sqlite.installation.php

Install Language

Today i noticed, install.language files has their own encoding

$txt['lang_character_set'] = 'xxx';

Can we make a little trick to get this string from index language file?

note: currently very tired 4.30 am here. I'll update this issue further writing for now (to notice myself later).

Post template broken

tested with a completely new installation, start a new topic and the following warning appears:

"The following error or errors occurred while posting this message:
Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic."

a second bug: the preview and post buttons are shown outside the rounframe container.

Tested with Chrome.

SQLite upgrade fails

At least here due to issues with indexes and their names in particular.
See http://flylib.com/books/en/4.112.1.60/1/ for details.
In summary:

CREATE TABLE {$db_prefix}log_activity (
  date date NOT NULL default '0001-01-01',
  hits int NOT NULL default '0',
  topics smallint NOT NULL default '0',
  posts smallint NOT NULL default '0',
  registers smallint NOT NULL default '0',
  most_on smallint NOT NULL default '0',
  PRIMARY KEY (date)
);

creates an index named (smf_log_activity autoindex 1), during the upgrade there is the command:
$smcFunc['db_remove_index']($db_prefix . 'log_activity', $db_prefix . 'log_activity_hits');
that ends up running the query:
PRAGMA index_info((smf_log_activity autoindex 1))
obviously wrong.

What's the best way to fix it?
I tried with $smcFunc['db_escape_string']($row['name']) but no luck.
2nd test has been with strtr($row['name'], array('(' => '\'(', ')' => ')\'')) and "of course" worked.

Now the question is: is it enough put the strtr there or better have it somewhere else too?

Search for languages broken

Searching for languages is broken from SM.org.

Admin -> Configuration -> Add Language.

Do a search and itll return:

The Simple Machines site is not responding. Please try again later.

Time to wrap-up?

We have several things in place and several pending, we are also "a bit" behind the schedule (not that there was any schedule :P), so maybe it's time to put a stop and wrap-up what we have.

Any objection if from Monday only bug-fixes will be accepted? (pull requests pending will be processed)

BTW I'm not the one that has to decide. :P

username checks (registration and login)

I'm not sure if this is a bug since there it's a regexp...
In Register.php there is:
if (preg_match('~[<>&"\'=\\\]~', preg_replace('~&#(?:\\d{1,7}|x[0-9a-fA-F]{1,6});~', '',
while in LogInOut.php:
if (preg_match('~[<>&"\'=\\\]~', preg_replace('~(&#(\\d{1,7}|x[0-9a-fA-F]{1,6});)~', '',
The two patterns of the preg_replace are slightly different.

Is it correct?
One of the two is wrong? If so which one should we use?

Fatal error when opening a board

I got a fatal error when opening a board in SMF 2.1, from the GitHub repo.

Fatal error: Call-time pass-by-reference has been removed; If you would like to pass argument by reference, modify the declaration of call_integration_hook(). in /var/www/smf2.1/Sources/MessageIndex.php on line 665

Line is this:

call_integration_hook('integrate_messageindex_buttons', &$context['normal_buttons']);

Removing the & sign worked for me and fixed the error.

Using PHP 5.4.6 with Apache 2.

$txt['attach_dir_desc'] needs rewriting

In admin.english.php

Find
$txt['attach_dir_desc'] = 'Create new directories or change the current directory below. Directories can be renamed as long as they do not contain a sub-directory. If the new directory is to be in the created within the forum directory structure. Just the directory name can be used. To remove a directory, blank the path input field. Directories can not be deleted if they contain either files or sub-directories (shown in brackets next to the file count).';

Replace with
$txt['attach_dir_desc'] = 'Create new directories or change the current directory below.
To create a new directory within the forum directory structure, use just the directory name.

To remove a directory, blank the path input field. Only empty directories can be removed. To see if a directory is empty, check for files or sub-directories in brackets next to the file count.

To rename a directory, simply change its name in the input field. Only directories without sub-directories may be renamed.'Directories can be renamed as long as they do not contain a sub-directory. If the new directory is to be in the created within the forum directory structure.';

Integration Hooks Setting

Just synced up my "smfgit" copy on my server with the repo here, and see that there's now a setting to enable/disable integration hooks. While I definitely agree we should have a setting to disable hooks in an emergency and I like the page listing all the hooks, I don't think having them disabled by default is a good idea, nor do I think we need to have a huge warning telling people to only enable them if they know what they're doing.

As I recall, SMF's current implementation of integration hooks prevents them from breaking things too much anyway - if a function is assigned to a hook, it's only called if it exists. The few non-function hooks (integrate_pre_include for instance) could still break things, but I haven't actually heard of this happening.

[Feature Request] Disable Registration during installation

I'm sure i'm not the only one who gets spammers to register within a few hours after installing SMF. So what I'm requesting is a simple checkbox to enable/disable registration during setup which can be changed in SMF administration panel.

That would be helpful for sites (like mine) that get spammers all the time.

$txt['msg_alert_none'] = 'No messages...'; general usage

$txt['msg_alert_none'] is used in general to tell there's no new messages and no new posts.

It is used in the recent files, the messageindex & the personalmessage.

It doesn't mean the same in English (or at least isn't the most correct to use) and it doesn't work at all in Danish.

I haven't exactly checked what it is used for in the Recent template, but in messageindex it's used to tell there are no topics in an empty board. It should really say "No topics" or "No posts".

Then keep $txt['msg_alert_none'] for PMs.

PS: This is of course also a SMF 2.0.x issue.

!empty vs. count

Original report by iksa: http://www.simplemachines.org/community/index.php?topic=493625.0

in function SendMailing() in file ManageNews.php there are many comparisons to !empty() that should be comparisons to count(). Just to reproduce one issue this causes, try to deliver an admin newsletter to the group 'Regular Members' (whose identifier is zero). You won't be able to get it delivered unless you also select some other group to deliver it to (which makes a difference in the condition empty($_POST['groups']))

Renewal of subscriptions should have a different cost

It would be really useful if admins could specify a different cost when a member wants to renew their subscription than when a member is going to get one for the first time. That would encourage people to keep paying for the same service.

I've no idea of how to mark this as a feature request.

Browser caching

We will need to change ?fin20 to alpha1 (or dev), for the first community tests. Possibly other small versioning stuff.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.