Facebook  Twitter 


+- +-


+- User Information

Welcome, Guest.
Please login or register.
Forgot your password?

+- Forum Stats

Total Members: 12424
Latest: serbenfiquista
New This Month: 5
New This Week: 0
New Today: 0
Total Posts: 40041
Total Topics: 7046
Most Online Today: 47
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 48
Total: 48

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - SMFHacks

Pages: 1 2 [3] 4 5 ... 17
Pretty Urls / prettyurls - Filters.wiki
« on: July 13, 2018, 04:22:02 pm »
Pretty URLs is organized around filters, which are sets of instructions about what to do to with a page's URLs. If you want to change how Pretty URLs operates, or to add extra functionality, you will need to understand how a filter is constructed.

The filters array
The data for each filter Pretty URLs uses is all contained in a single array, which is serialized and stored in the pretty_filters database setting. You can edit this database setting yourself, however to make it easier to do so, a hidden admin tool was created which can be accessed at index.php?action=admin;area=pretty;sa=filters or admin/?area=pretty;sa=filters if the actions filter is enabled. This tool displays the array in the JSON format which should be easier to edit, however the parser is still rather strict.

So what does the array contain? Well the best way to explain is with an example filter. Here is a filter in the PHP array format which, for example, you might add with a package:

Code: [Select]
$prettyFilters = array( 'example' = array( // The filter must have an ID which is also the array's key 'description' => 'A new example filter', // This description will be displayed in the admin panel 'enabled' => 1, // Set enabled to 1 to enable and 0 to disable it 'filter' => array( // Filter callbacks are functions which are run to process each URL in a page 'priority' => 5, 'callback' => 'pretty_example_filter', // Name of the function to run ), 'rewrite' => array( // Most filters will add rewrite rules which will change a pretty URL into a less pretty, but more useable, internal URL 'priority' => 5, 'rule' => 'RewriteRule ^example\.html index.php?action=example [L]', // The RewriteRule to add to the .htaccess file, if there are multiple rules for a filter this can be an array of strings ), 'test_callback' = > 'pretty_example_test', // A function which returns an short array of links which will be rewritten by this filter 'title' => 'Example', // This title will be displayed in the admin panel ), );

Each filter may have filter or rewrite sections. If it does, then each must have unique priority numbers, though a mod may use the same number for both it's filter callback and rewrite rules. These priority numbers are sorted in ascending order. Custom filters should use numbers less than 20 if they want to catch URLs before any of the standard filters do, or numbers more than 80 if they want to catch URLs only if the other filters have ignored them.

Here is the above array in JSON format:

Code: [Select]
{ "example": { "description": "A new example filter", "enabled": 1, "filter": { "priority": 5, "callback": "pretty_example_filter" }, "rewrite": { "priority": 5, "rule": "RewriteRule ^example\.html index.php?action=example [L]" }, "test_callback": "pretty_example_test", "title": "Example" } }

Filter callbacks

Filter callback functions do the work of rewriting a page's URLs. The list of URLs is passed to the function which can then change them however it likes. Usually various regexs will be used to search for query string fragments to replace. Here is an example function which would produce the URL used in the above filter:

Code: [Select]
function pretty_example_filter($urls) { global $boardurl, $scripturl;

$pattern = '`' . $scripturl . '?action=example$`S';  // The pattern to search for, in this case action=example, use ` so that ~s in URLs will work.
$replacement = $boardurl . '/example.html';   // The replacement URL
foreach ($urls as $url_id => $url)
    if (!isset($url['replacement']))   // This is very important: unless you are very certain of what you're doing, do not rewrite URLs that have already been rewritten!
        if (preg_match($pattern, $url['url']))
            $urls[$url_id]['replacement'] = preg_replace($pattern, $replacement, $url['url']);
return $urls;

Test callbacks
Test callback functions return a short array of links which will be written by the filter.
Code: [Select]
function pretty_example_test() { global $scripturl, $txt;

return array('<a href="' . $scripturl . '?action=example">' . $txt['example_link'] . '</a>');

News / Pretty Urls SEO Pro Released
« on: July 12, 2018, 09:54:44 pm »
We have just released Pretty Urls SEO Pro Released for SMF 2.0.x. PrettyUrls SEO Pro helps improve search engine ranking by employing various tweaks and improvements. Such as sitemap information to point search engines to the main forum areas, Open Graph support to allow social media and search engines easy access to your forum information for spidering. In addition allows you to create your own custom 404/403 erorr pages, edit your .htccess file and robot.txt and more.

For more information on Pretty Urls SEO Pro visit https://www.smfhacks.com/prettyurls-seo-pro.php

Existing active Community Suite license members can download the latest version of Pretty Urls SEO Pro from the download forum for Pretty Urls SEO Pro

News / Message Editor Pro released
« on: June 20, 2018, 08:06:24 pm »
We have just released Message Editor Pro. Adds a new post/message editor system to SMF. This new editor uses the same editor that SMF 2.1 has! This new editor solves issues that the old WYSIWYG editor had and is more stable Get your users used to new editor early!
Works with any richtext box added including bbc code areas used by mods as well. Also includes a new justify bbc code as well. 

For more information on Message Editor Pro visit https://www.smfhacks.com/message-editor-pro.php

Existing active Community Suite license members can download the latest version of Message Editor Pro from the download forum for Message Editor Pro

News / Emoji Pro Released
« on: June 07, 2018, 08:12:34 am »
We have just released Emoji Pro a fun emoji system with over 1600 emoji's with groupings that can be added to your posts.
I had this system built for my free forum hosting services and decided it would be awesome to offer to other users on SMF as well.

How it works it adds a smiley/emoji icon in any place that there is an editor such as posting/personal messages etc. It works with both the text editor and the wysiwyg editor.  A cool part about this system it uses images for the emojis and works with any character set and has the same appearance for everyone.

For more information on Emoji Pro visit https://www.smfhacks.com/emojipro.php

Existing active Community Suite license members can download the latest version of Emoji Pro from the download forum for Emoji Pro

News / GDPR Pro 2.0 Released for SMF
« on: June 01, 2018, 06:29:31 pm »
We have released GDPR Pro for SMF 2.0.x and SMF 1.1.x. The GDPR is a legal requirement for forum owners who have users that are located in the European Union. It does not matter what country you are located in if you deal with EU Users.  GDPR is basically a user consent/rights to their data and how it is secured. With GDPR Pro for SMF helps inform users of their privacy rights, gives them right for erasure, right to export the data.

For more information on GDPR Pro visit https://www.smfhacks.com/gdprpro.php

In addition we will be listening to feedback and doing custom requests based on the needs for your forum.

Major changes in Version 2.0

+Added support for privacy policy in different language.
+Added option to disable privacy policy footer link.
+Redid how post downloads work to make it easier
+Added IP information to user data export.
+Data exports now support different file types .csv, xml, or html
+Custom fields now exported for user information
+Added columns for privacy policy date, registration date for users and displayed on the profile page
+Notifies in admin area if members can't delete their account. And links to a fix.
+If they don't agree to privacy policy still allow them access to modify/export their data
+Reconfirm registration agreement now support multiple languages
+Added setting for number of messages that can be exported at a time
!Fixes all links, variable names to be gdpr

Existing active  Community Suite license members can download the latest version of GDPR Pro from the download forum for GDPR Pro

We specialize in all areas of SMF and hosting in general.

Services that we can provide
SMF Upgrades from SMF 1.1.x to newer versions. And also minor updates.
Conversions to SMF from other forum software
Handle mod conflicts on installing modifications
Fix errors that being logged by modifications
Performance improvements by optimizing your SMF/Hosting environment
Installing SSL and make sure your forum is https
Upgrade PHP get a peroframnce boost by switching to PHP 7.x from old versions of PHP
Other troubleshooing/customizing SMF - custom mod development starts at $500 for 10 hours of work

Most of these tasks require an admin account on the forum, FTP/SFTP and or SSH/Cpanel access.

We take PayPal, bitcoin, ethereum as payment

For more information please send us a PM/Contact Us

Latest Mods / [Mod]GDPR Helper
« on: April 29, 2018, 03:02:15 pm »
GDPR Helper


For SMF 2.0.x and SMF 1.1.x

Warning does not guarantee GDPR compliance. No warranty provided.

Allows member to export their data. Their profile and post information
On member deletion clears IP address and email from posts and assigns a new username to all old posts.
Includes a privacy policy page, adds link in the footer e and adds a section for consent on registration
Stores the date/time that the privacy policy was changed and option to force to reagree
Stores the date/time that the registration agreement was changed and option to force to reagree

Announcements / SMF Gallery Pro 8.0 Released!
« on: February 17, 2018, 06:50:01 pm »
We have just released SMF Gallery Pro 8.0! Works for SMF 2.0.x SMF 2.1.x and SMF 1.1.x.
Updates for this release focus on improving user experience and fixing some minor style issues in SMF 2.0.x
For complete details on the changes read the changelog below.

+Improved sorting dropdowns in various areas now maintain the value that was selected.
+Added check all to comments waiting approval and images waiting approval in the moderation center
+Added unfavorite link when viewing myfavorites to unfavorite an item
+Added option to set the number of items per page on the List All pages.
!Fixed style issue if not enough results to fill table leaving table across.
!If ONLY_FULL_GROUP_BY is enabled in MySQL 5.7+ disable it for SMF 2.0.x
!Fixed display of html linking codes for video the copy icon was off.
!Fixed text on category select for add audio/video to say audio/video instead of picture
!List files link in space manager for SMF 2.0 now stays in the admin section
!Fixed Tag Cloud Header display for SMF 2.0.x
!Addthis link made https
+Updated latest autoembed media sites

Changes since 7.0 release.
!Minor fixes for SSL for facebook/twitter sharing on view picture/media page.
+Updated/fixed video link embeding for some video sites.
+Added copy icon which auto copies sharing links when clicked.
+Added option when clicking add picture in gallery menu to select either a single picture or bulk
+Added link on category name in on bulk upload page
!Fixed bug with possible autoapproving permissions for category level permissions
+Added autoapprove category level permission
+Added on search page option to search global custom fields
+Brand new html5 bulk uploader with drag and drop support. Chrome 7+ Firefox 4+ IE 10+ Opera 12+ Safari 6+
!Fixed issue for video description not being taken in some cases for SMF 2.0.x and SMF 2.1 for special characters.
+Added max filesize display under add/edit image and audio/video file upload field
+Added setting to disable showing of fullsize images in which only the medium image will be shown. This is found under Settings then "Picture Fullsize Display: " then choose the option nothing/Nothing/No Fullsize Image"
+Added video rotation controls via for mp4, ogg, webfm files
+Updated video embeding regex's
!Delete temp file if not a valid picture file for disk space/security
+Added mark all items as viewed button on the view unread items page
+Updated style classes for SMF 2.0.x SMF 2.1 to look better on custom themes
+Changed some wording language to highlight audio media supported as well
!Thumbnails for next/previous mini images now respect images that are marked as mature and will show a mature image picture.
!Fixed bug with "Post Image Upload" addon to SMF Gallery Pro to main user gallery and undefined keywords error log.
!Fixed add video link == in main menu dropdown SMF 2.0.x and SMF 2.1 Beta 1
!Fixed db error when editing a user gallery category for SMF 2.0.x
!Fixed undefined context['search'] for SMF 1.1.x on searching

Fore more information on SMF Gallery Pro visit

Existing active customers can download from

If you need to renew your license. The renewal page is found at:

News / SMF4Mobile 2.0 released for SMF 2.0.x
« on: January 02, 2018, 08:25:59 am »
SMF4Mobile - a mobile theme for SMF. We have taken over the development of this project and have now pushed out version 2.0 of the SMF4Mobile theme and modification.

Built on top of powerful jQuery Mobile frameworks, SMF4Mobile supports a wide variety of platforms including latest versions of Android, iOS, Windows Phone and a lot more.

Easy to install and configure
It's just a theme! Just install it and the companion modification and you are ready to go! The theme will automatically switch between desktop and mobile depending upon the device

New improved version 2.0 includes:
2.0 Theme
!Fixed login issue for new SMF version due session check
+Added reCaptcha support v2 Support
+Profile in display.template.php now linked to profile page
+Added basic login support for the admin area
+Added more menus if mods are installed. SMF Gallery, SMF Store, SMF Classifieds, Downloads System, SMF Articles
+Added support for AdSeller Pro and Admanagement mod ad placements on display,boardindex and messageindex templates
+Added full site link in the main menu dropdown
!Fixed broken html tag in display.template.php
!Default captcha for SMF now supports six characters instead of five
!Text of Go Up and Go Down now uses language strings

2.0 Mod
!Better security on the redirect link to stop spammers abuse
+Disable ezPortal if it is enabled

SMF4Mobile Demo: https://smfmobile.com/community/index.php?thememode=mobile
Learn more and order at https://smfmobile.com/community/index.php?action=store;sa=view;id=3

News / SMF Store 3.0 Released
« on: January 01, 2018, 08:26:57 am »
SMF Store 3.0 has been released. This update brings category level sorting options, improve email for the shopping cart and admins. Along with other various tweaks and bug fixes for the store.
For more information on SMF Store visit http://www.smfhacks.com/smf-store.php  A complete list of changes is available below in the changelog:

Version 3.0
+New sorting and paging options on category level to help order products. Sort options include by price, title, rating, and total comments
+Added Search by license code or member name on licenses page
+Added a new setting called "Notify all store admins of item purchase" which sends an email to all store admins that an item has been purchased. This email message and subject can be customized in the email template section.
!Changed how emails are sent for shopping cart purchases. Now sends just one email not matter how many items in the cart. Instead of an email for each item.
!Removed some mysql_ functions from SMF 2.0 version
!Moved the viewers under view to the same line for store admins on the view product page.
!Updated sharing links to https
!Fixed bug with Add Product link showing in categories for guests
!Removed the duplicate print item button on view product page.
!Send to friend disabled on new installs by default
!Fixed downloads in mytransactions for users store showing other store owners transactions SMF 2.0.x
!Fixed typo in transaction export for payment status heading in SMF 2.0.x
!Hide related items link for userstore users on edit product
!Fixed paging links and search in stats and downloads and the comment approval area to stay in the admin section SMF 2.0.x
!Better file deletion checks
+Added support for Russian Rouble

Existing active SMF Store and Community Suite license members can download the latest version of SMF Store from the download forum for SMF Store

To renew your expired license visit

General SMF Forum / Tip: Image Proxy For SMF 1.1.x
« on: December 07, 2017, 10:43:41 am »
If you are on SSL  and still using SMF 1.1.x
It is relatively easy to backport the image proxy from SMF 2.0.x to SMF 1.1.x since it is standalone

For SMF 1.1.x
Copy the proxy.php from SMF 2.0.x to the root directory of your forum
Copy Sources/Class-CurlFetchWeb.php from SMF 2.0 to your SMF 1.1.x folder.

Create a cache folder in the root directory of your SMF and make it writable.

In your Settings.php
Add to it
Code: [Select]
$image_proxy_secret = 'yoursecrethashhere';
$image_proxy_maxsize = 5190;
$image_proxy_enabled = 1;

Lastly you need to make the edits less than 10 that say image_proxy_enabled or image_proxy_secret  from the sources/load.php and sources/subs.php files in SMF 2.0 just refer to similar code in SMF 1.1.x

News / SMFHacks Black Firday Sale 2018!
« on: November 20, 2017, 01:38:23 pm »
SMFHacks is having our once a year sale! We are discounting our SMF Store product to the lowest price ever seen! In addition, we have major discounts on Newsletter Pro and our entire SMF Community Suite which gives you access to all products that we have created.

Community Suite was $250 now only $200 - Includes all our software such as AdSeller Pro, SMF Gallery Pro, Download System Pro, SMF Classifieds, SMF Store and more!

SMF Store was $89 now only $59 our lowest price ever!

Newsletter Pro was $45 now only $25 our lowest price ever!

We are also offering discounts for hosting from our Hosting service HostIT We can offer shared hosting, Linux/Windows VPS, or build a custom dedicated server.  We own our own hardware and built the infrastructure ourselves.
Save 25% and we will even help transfer your forum! Offer End 11/26/2017
Use promo code: BLACKFRIDAY2017 - Good on any shared hosting plan or VPS Server

All these offers are for a limited time and end on 11/26/2017

Modifications Talk / [WIP] SMF Wiki for SMF 2.0.14
« on: May 31, 2017, 10:49:05 pm »
Originally by niko updated for SMF 2.0.14 and some other bug fixes. Licensed BSD

Note: This is only for testing purposes, not recommended on live sites!

This version isn't feature complete as of yet

It's highly recommended to enable cache when using Wiki mod.

Please report all bugs either here or issue tracker (Feature request are welcome, too!).


    Creating and Editing pages
    File Uploads


This page contains information about Wiki Codes supported by SMF Wiki!
Code                                 Example                            Description                     
[ [Main_Page ] ]   Main Page   Basic link to another page. Remove spaces in the brackets
[ [Main_Page|My Title ] ]   My Title   Link to page using another title  Remove spaces in the brackets
{{Example}}   This is example template.   Include page "Example" from Template namespace
{{Example2|test}}   This is example template, you gave parameter test.   Include page "Example2" from Template namespace with numbered parameter
{{Example3|text=My Text}}   Parameter text was My Text   Include page "Example3" from Template namespace with named parameter
<*nowiki>{{Example}}<*/nowiki> (use without *)   {{Example}}   Disables parsing of BBC and Wiki code inside tags.

<nowiki> tag can be used to make sure code isn't parsed.
Code is parsed in every tag with exception of [nobbc],
Code: [Select]
and [php]. Wiki code is parsed in [html] tag. (as of rev195)

[i]Standalone mode[/i]

Standalone mode enables you to run wiki outside SMF install directory. It's required to enable Friendly URLS.

Provided by file "wikistandalone.php" which should be put in SMF directory for Friendly URLs and somewhere else if you want to just run outside SMF directory. (on latter case you need to edit path in file).

Example rule for .htaccess for friendly urls


    RewriteEngine On
    RewriteRule ^wiki/(.*)$ wikistandalone.php?page=$1 [NC,QSA]

Remember to configure links from admin.

General SMF Forum / Are you killing your forum?
« on: May 24, 2017, 01:13:12 pm »
I posted this on SMF as well but this is a good topic for all forum owners.

Check now your PHP version now inside SMF.
To do so go to admin -> support and credits:

For SMF 2.0.x forums You need to be at least on PHP 5.6.30. I highly suggest moving to PHP 7.1.5 your site will become faster due to massive performance changes from 5.6 to 7.0.
Some benchmark websites: https://www.phoronix.com/scan.php?page=news_item&px=PTS-PHP-7.1-Benchmarks  https://kinsta.com/blog/the-definitive-php-7-final-version-hhvm-benchmark/
Site speed is a ranking factor for search engines. And also for users. The slower your site is the less likely they will come back if they find a better option.

What if your PHP version is not update? Well if you have a host contact your hosting provider and see if they can update it or give you an option to run a higher PHP version. If if you have VPS or dedicated server that is not managed you would be stuck with making sure all your software is up to date. It is not hard to do and there are many guides out their for all platforms.

In the news lately there has been talks about worms/viruses occurring to computers you should make sure your hosting software for your forum the PHP version, along with the server software itself is up to date. I just saw a user mentioned they run on Windows 2003 which has been hit hard lately but has been end of life (EOL) for many years now.  You do not want to wake one day and see your forum gone.

Backup Reminder

General reminder to always make backups of your forum and database. Try to do so at least once a month. For making database backups I would use a tool such as phpmyadmin, to make the database backups since sometimes the built in backup function in SMF doesn't always create a complete backup.

A new major release for SMF 2.0.14 which includes PHP7 support, support for SSL, security and bug fixes.

SMFHacks has just updated our server to PHP 7.1.5 and in doing we also we are releasing an unofficial version of SMF 1.1.23 which helps patch SMF 1.1.x for PHP7. http://www.smfhacks.com/index.php?action=downloads;sa=view;down=204

I am also running a hosting promotion for my own website hosting service which focuses on forums.
SMF - Web Hosting by HostIT our hosting service
We are also offering hosting for SMF. On our own fast SSD servers with shared plans, VPS, and dedicated servers.
Use promo code: SMFHACKS
Save 10% and we will even help transfer your forum!

Pages: 1 2 [3] 4 5 ... 17

+- Recent Topics

Order of photos by D4611001
January 21, 2020, 12:06:36 pm

Cannot install by SMFHacks
January 18, 2020, 09:40:56 pm

Call to undefined function mysql_query() by SMFHacks
January 18, 2020, 02:06:47 pm

English British Translation file by HAL9000
January 17, 2020, 05:44:28 pm

Characters dispayed as boxes by SMFHacks
January 16, 2020, 07:21:51 am

Multiple adds where one used to be? by SMFHacks
January 07, 2020, 08:20:38 am

Ribbon Theme Logo Position by slizzie1986
January 06, 2020, 08:52:31 pm

System enhancement? by SMFHacks
January 03, 2020, 09:22:45 am

Pretty Url Pro Is it compatible with 7.2? by Rock Lee
January 01, 2020, 08:53:50 pm

SMF Cookie Change Compatibly by HDB
December 28, 2019, 03:33:49 pm

Powered by EzPortal