Tech geek. Life geek.

Tag: hack (Page 1 of 2)

Dirty Hack: Add CDN support into phpBB 3.1.6

It works for phpBB 3.1.x, not just phpBB 3.1.6. For a national forum or global forum, it is a must to have a CDN support.

The way I used is not a formal extension or plugin. It is a hack, actually a dirty hack. If you have no experience for it, you can close this page now.

Now, let’s start.

  1. Backup everything of your phpBB, include files and database.\
  2. URL path example.
    Forum url is
    CDN url is
  3.  Open /includes/functions.php
    add following in line 5112

    // Add CDN path
    $cdn_cache = '//';

    Find following around Line 5216

    'T_ASSETS_PATH'         => "{$web_path}assets",
    'T_THEME_PATH'         => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme',
    'T_TEMPLATE_PATH'      => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/template',

    Replace by

    'T_ASSETS_PATH'         => $cdn_cache."assets",
    'T_THEME_PATH'         => $cdn_cache."styles/" . rawurlencode($user->style['style_path']) . '/theme',
    'T_TEMPLATE_PATH'      => $cdn_cache."styles/" . rawurlencode($user->style['style_path']) . '/template',

    Find following around Line 5230

    'T_STYLESHEET_LINK'      => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/stylesheet.css?assets_version=' . $config['assets_version'],
    'T_STYLESHEET_LANG_LINK'    => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/' . $user->lang_name . '/stylesheet.css?assets_version=' . $config['assets_version'],

    Replace by

    'T_STYLESHEET_LINK'      => $cdn_cache."styles/" . rawurlencode($user->style['style_path']) . '/theme/stylesheet.css?assets_version=' . $config['assets_version'],
    'T_STYLESHEET_LANG_LINK'    => $cdn_cache."styles/" . rawurlencode($user->style['style_path']) . '/theme/' . $user->lang_name . '/stylesheet.css?assets_version=' . $config['assets_version'],

    Save and overwrite the original file.

  4.   Open /includes/functions_content.php
    Find following around Line 902

    return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/(.*?) \/><!\-\- s\1 \-\->#', '<img class="smilies" src="' . $root_path . $config['smilies_path'] . '/\2 />', $text);

    Replace by

    return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/(.*?) \/><!\-\- s\1 \-\->#', '<img class="smilies" src="' .'//'.$root_path. $config['smilies_path'] . '/\2 />', $text);

    Save and overwrite the old file.

  5. Then purge cache in the ACP.

Look at the waterfall chat after this hack.


The CDN service provider is KEYCDN. You can apply through this link.

A type of Hacker on WordPress

During past week, I saw two shell accounts are hacked. Both are on Dreamhost.
One of it is reported by Google Webmaster Tools. It said there are some malicious code found.
The other one is found, because that the memory usage is increased too fast, but no increase on PV.
I checked the account and be noticed some wired issues.
One of the important files, .htaccess is changed by a hacker.
It send web spiders, such as Google bots, Bing, ASK, to a third party site, which has a malicious code. The code may affect the user computers.
When user enter a wrong URL, user should see a 404 error page from the site. The hacker also send these users to the remote site, which has malicious codes.
SO, if you land the website on the right page URL, you will not see it.
It looks normal and no problems.
The hacker steal the traffic from the sites. And also has potential risk to the users of the site.
How to fix hacked WordPress blog?
The way I did to clean it is that simply.
1) Export the data
2) Make a new shell account on Dreamhost
3) Point the site to new account
4) Install the fresh, updated version software
5) Import the data
Then last step to delete the old shell account.

Continue reading

Best choice of Wii mod chip

There are many different brand mod chips for Wii.
WiiKey, D2CKey, Cyclowiz, Wiinja, Wiinja Deluxe, Wiibuster, etc.
Compare with the price, function, features and the Wii Drivechip, I recommend Wii Key 2.
Wii Key 2 support DMS, D2A, D2B, D2C, D2C-2 and D2E chipsets. Support all regions, including USA, JAP, PAL and KOREA
The full specification shown below:

* Compatible with DMS, D2A, D2B, D2C, D2C-2 and D2E chipsets
* Compatible with all regions, USA, JAP, PAL and KOREA
* Compatible with D2B “cut pin” drives (does not require the cut pins to be connected)
* Fully configurable and updatable via DVD
* Advanced automatic region detection with fallback (works even if a drive is changed to a different region Wii)
* Region override for Wii and Gamecube games
* Direct Boot of Wii original, import, and backup games
* Direct Boot of Gamecube original, import, and backup games
* Direct boot of homebrew in GC mode
* Supports multi-disc games, DVD-R, +R, +RW (no bitsetting required)
* Supports Dual Layer
* Supports factory made ‘silvers’, even with incorrect header data
* Supports, SMG, SSBB, Mario Kart and other ‘problem’ titles
* Streaming audio-fix for Gamecube games
* Diskspeed configurable via DVD, with separate settings for different media types
* Recovery mode makes it impossible to brick the chip with a bad flash
* 8Mbit onboard flash for storing data and applications
* Rock solid performance with 3.3V FPGA core and high quality components
* Multifrequency Ringpiece Oscillators (MRO) for optimum performance, even with problem drives
* Onboard status LEDs

It is only 19.95, plus tax $1 and shipping fee, total is $25.90. When you make order through Shipping taks about one week.
Now it is yellow tag in the back of Wii Key 2 chip, so 6 solder points only for D2C, D2C2, or D2E.

Continue reading

phpBB official site is hacked

phpBB official site was hacked one week ago. It is still under maintenance.

We are sorry to report that we have been attacked through a 0-day-exploit in our PHPList installation (responsible for the mailing list about new releases). will remain unavailable while we work to recover. No vulnerabilities have been found in the phpBB software itself.
You can download phpBB here:
You can get support at the temporary support forums or on IRC: #phpbb
A more detailed explanation about the incident.
Press Contact: If you need to get in contact with the management, please email phpbb_press (at) marshalrusty (dot) com.
– the phpBB team

I do have some forum powered by phpBB. It is good news that phpBB software is OK.

SEO hacking for Joomla 1.5.2

Joomla! is a wonderful open source CMS. But the performance of content on Search Engine Results is not good enough.
Some SEO (Search Engine Optimize) hacking should be taken to make it better on SERP.
The first one is H1 tag.
Joomla does not take H1 on it template. So the Search Engine can not find the important part of the page.
To add H1 on the page title, article title, you need to do following html hack.
Use whatever html editing tools you like, I use Dreamweaver now.
The template files are sitting here.
\website root\components\com-content\views\frontpage\tmpl\default_item.php
\website root\components\com-content\views\article\tmpl\default.php
\website root\components\com-content\views\category\tmpl\default.php
\website root\components\com-content\views\section\tmpl\default.php
Find “contentheading”
Then add <h1> </h1> around the heading tag.
Save them and upload them to site.
When you browse the page after H1 hacking, the title will looks bigger than before.
You can also use css to add H1 style for them.

« Older posts

© 2020 David Yin's Blog

Theme by Anders NorenUp ↑