View Full Version : Administrative and Maintenance Tools - Fix-it: Template Edition
GeekyDesigns
04-02-2012, 10:00 PM
A common method of defacing vBulletin sites is to edit the parsed template html directly via the database. It makes it harder for administrators to find the issue, and can be a pain in the ass to cleanup if you're not familiar with working with the database.
This tool will make it easier to clean your defaced site.
What it does:
Checks all of the templates in the database:
- Makes a new compiled version from the uncompiled template.
- Compares the current compiled template to the new compiled template
- If they differ, it updates the template, then rebuilds all of the styles.
How do you use it?
- Upload to your admincp, modcp, install, or root forums folder
- Browse to it
- Let it run
- Delete tool_recompiler.php after you are done using it.
This tool now works on vB3 and vB4.
vB3 Thread (https://vborg.vbsupport.ru/showthread.php?t=220967)
ptceuro
04-03-2012, 09:27 PM
thank you GeekyDesigns
Krusty1231
04-03-2012, 10:02 PM
So, just to be clear - I only need this AFTER something bad happens? So if I install it right now while everything is good - and say a few months from now my forum gets hacked, I just have to run it?
Or, I do not install it now - my forum gets hacked in a few months - then come back here and install it?
I'm not entirely clear on that part.
Zachery
04-03-2012, 10:05 PM
There is no reason to have the file on your server, unless something bad has happened.
It will only fix the template system, if they only modified the parsed templates.
It they replaced everything, I don't believe it will get fixed.
If they messed with the plugin system, it will also not be fixed.
Link14716
04-03-2012, 10:10 PM
So, just to be clear - I only need this AFTER something bad happens? So if I install it right now while everything is good - and say a few months from now my forum gets hacked, I just have to run it?
Or, I do not install it now - my forum gets hacked in a few months - then come back here and install it?
I'm not entirely clear on that part.
Yeah, don't install it now. Download it, or bookmark this page if you want, but you shouldn't leave it on your server when you aren't using it (it's not a security risk, but you don't really want a file that fetches all the templates and re-compiles them just laying around - if someone happened to find it and hammered it, it could impact your server load).
It's a tool that can help clean up defaced forums if the templates are hacked a certain way, so it can be very useful if that happens. Just remember that that is all it does, it won't magically fix everything else or prevent you from being compromised again - it's a tool, not a cure.
BirdOPrey5
04-23-2012, 05:27 PM
Any additional info on what these errors may mean?
Uncompiled template could not be compiled due to error: blog_sidebar_user_block_visitors (id: 4187, styleid: -10)
Uncompiled template could not be compiled due to error: vbcms_widget_recentarticle_page (id: 4301, styleid: -10)
Uncompiled template could not be compiled due to error: vbcms_widget_recentcontent_page (id: 4312, styleid: -10)
Besides the obvious that an error occurred?
Zachery
04-24-2012, 08:07 PM
Templates with a styleid of -10 i dont think should be in the database at all.
BirdOPrey5
04-24-2012, 08:54 PM
I have 956 templates in the database with a styleid of -10. It looks like it is the MASTER style.
There were a number of other templates with id of -10 that were rebuilt just fine.
Zachery
04-24-2012, 10:56 PM
Weird styleid -1 always used to be the master style (must be all the new stuff).
Check those styles and make sure they're okay?
BirdOPrey5
04-26-2012, 11:03 AM
I looked at them in the database, I didn't see anything obviously wrong with them. Everything seems to be working so I'm not going to worry about it, just wasn't sure if you knew off-hand if that error was common or meant something other than what is said.
Still a great tool. :up:
Link14716
05-14-2012, 04:31 PM
Any additional info on what these errors may mean?
Besides the obvious that an error occurred?
It means that the compile_template function returned an error. I should probably look into making it display a more specific error, but I honestly didn't think it'd pop up that often.
thecelticway
05-19-2012, 01:29 PM
hi
uploaded this to my FTP>>AdminCP.......
cant seem to find it in the AP... am I missing something:(
Boofo
05-19-2012, 04:22 PM
Wasn't the file named tool_reparse.php at one time?
thecelticway
05-19-2012, 07:57 PM
anybody any idea where exactly does this file go~~~~:confused:
BirdOPrey5
05-19-2012, 08:07 PM
The instructions are right in the first post- right under: How do you use it?
thecelticway
05-19-2012, 08:48 PM
The instructions are right in the first post- right under: How do you use it?
thanks m8~~~~~ trouble is I cant see it in the AP..... even now I've put it in the Root folder
any help???:confused:
Boofo
05-19-2012, 09:33 PM
If it is in the site root:
http://www.yourdamin.com/tool_recompile.php
NOTE: change yourdamin.com to your site name.
BirdOPrey5
05-19-2012, 09:38 PM
You're not supposed to see it in the Admin CP.
You just upload it and then browse to it in your browser by manually typing in the URL, an example which Boofo posted above.
thecelticway
05-19-2012, 10:15 PM
You're not supposed to see it in the Admin CP.
You just upload it and then browse to it in your browser by manually typing in the URL, an example which Boofo posted above.
mmmmmmm..... dont work guys~~~~
Your search - http://www.thecelticway.net/tool_recompile.php - did not match any documents.
Suggestions:
Make sure all words are spelled correctly.
Try different keywords.
Try more general keywords.
any idea's ~~~~ really desperate to get the site back up.:(
BirdOPrey5
05-19-2012, 11:09 PM
You have it in your website root right now...
http://www.thecelticway.net/tool_recompile.php
You need to move it to your forum root
http://www.thecelticway.net/forum/tool_recompile.php
thecelticway
05-19-2012, 11:38 PM
You have it in your website root right now...
http://www.thecelticway.net/tool_recompile.php
You need to move it to your forum root
http://www.thecelticway.net/forum/tool_recompile.php
sorry joe~~~~ same message....
Your search - http://www.thecelticway.net/forum/tool_recompile.php - did not match any documents.
Suggestions:
Make sure all words are spelled correctly.
Try different keywords.
Try more general keywords.
:(
BirdOPrey5
05-20-2012, 12:28 AM
Clicking on the link works-
http://www.thecelticway.net/forum/tool_recompile.php
You just need to turn on your forum for the tool to work. It doesn't work with the forums turned off.
Once you run it be sure to delete it.
thecelticway
05-20-2012, 04:24 PM
Clicking on the link works-
http://www.thecelticway.net/forum/tool_recompile.php
You just need to turn on your forum for the tool to work. It doesn't work with the forums turned off.
Once you run it be sure to delete it.
thanks Joe~~~~ got it:up:
but does this mean~~~~please
Template Recompiler Tool! ? Geeky Designs
You should remove this file from your server when you are done with it.
While it poses no substantial risk to your site's security, recompiling every template in the database is intensive on your server.
Keeping this file on your server would allow anyone to hammer your server with requests to this file.
Recompiling templates...
Template updated: error_summary (id: 2847, styleid: -10)
Uncompiled template could not be compiled due to error: newpost_preview (id: 2537, styleid: -10)
Uncompiled template could not be compiled due to error: post_thanks_javascript (id: 4030, styleid: -1)
Templates recompiled! Rebuilding styles...
Rebuild Style Information
Updating style information for each style
Default Style (vB3 Style - Incompatible) ... (Templates) !D?:6Г?u(Replacement Variables) $p(Controls) Done.
vB4 Default Style ... (Templates) !D?:6Г?u
:confused:
BirdOPrey5
05-20-2012, 07:21 PM
well you might as well delete your VB3 templates, they will never work on VB4... and try again.
thecelticway
05-20-2012, 08:45 PM
well you might as well delete your VB3 templates, they will never work on VB4... and try again.
thanks Joe..... does this look any better:up:
Template Recompiler Tool! ? Geeky Designs
You should remove this file from your server when you are done with it.
While it poses no substantial risk to your site's security, recompiling every template in the database is intensive on your server.
Keeping this file on your server would allow anyone to hammer your server with requests to this file.
Recompiling templates...
Uncompiled template could not be compiled due to error: newpost_preview (id: 2537, styleid: -10)
Uncompiled template could not be compiled due to error: post_thanks_javascript (id: 4030, styleid: -1)
No templates needed recompiling.
Thank you for using our tool!
BirdOPrey5
05-20-2012, 08:58 PM
It looks better... note sure about these errors, I got a couple myself, didn't notice any issues afterwards- maybe the mod authors can chime in.
thecelticway
05-20-2012, 09:15 PM
It looks better... note sure about these errors, I got a couple myself, didn't notice any issues afterwards- maybe the mod authors can chime in.
defo: forum pages loading faster... lot faster
virus warning from Firefox no longer showing...... dont know about IE
:up:
thecelticway
05-21-2012, 12:32 PM
SHIT!!!!!!.... virus warnings are back :confused:
anybody any idea how to remove this script......:(
Link14716
05-29-2012, 12:13 AM
Wasn't the file named tool_reparse.php at one time?
Yeah, it was.
SgtSling
08-04-2012, 10:27 PM
It means that the compile_template function returned an error. I should probably look into making it display a more specific error, but I honestly didn't think it'd pop up that often.
I am having the same problem with the styleid: -10) error.
I want to run this script because I had a template hack (or so I think)
Is there a fix for this?
Trevor Matthews
05-27-2013, 11:24 AM
Recompiling templates...
Uncompiled template could not be compiled due to error: sidebarext_temp (id: 3258, styleid: -10)
Uncompiled template could not be compiled due to error: vbcms_grid_31 (id: 2244, styleid: 0)
Uncompiled template could not be compiled due to error: vbcms_grid_30 (id: 2243, styleid: 0)
Uncompiled template could not be compiled due to error: vbcms_grid_28 (id: 2240, styleid: 0)
Uncompiled template could not be compiled due to error: form_results_table_thead (id: 5310, styleid: -1)
Uncompiled template could not be compiled due to error: sidebarext_temp (id: 6638, styleid: -1)
No templates needed recompiling.
Just wonder if my results look OK.
Having trouble with the forum at the moment with VPS resource issues all pointing at my vbulletin installation according to 1and1.
Bob_R
08-10-2013, 04:23 PM
I seem to have a problem with a plugin not being able to be installed correctly/totally. I get a 404 screen when I go to the plugin link. When I install the xml for the plugin I get:
Parse error: syntax error, unexpected T_STRING in /xxxx/xxxx/xxxx/talkclassicrock.com/forums/includes/adminfunctions_plugin.php(1199) : eval()'d code on line 16
Would this hack help me?
Bob_R
08-10-2013, 05:30 PM
WTF?
Request Timeout
This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.
Zachery
08-11-2013, 06:53 PM
This isn't a plugin, this is a one time use file, it is intended as disaster recovery and nothing more or less.
Bob_R
08-12-2013, 02:00 PM
OK, thanks.
SupportAM
10-04-2013, 04:49 PM
running it now ... finger crossed......
I am so tired ..... have tried eveything.
SupportAM
10-04-2013, 04:51 PM
Ahhhhh ...... it didn;t work ! It said style rebuilt but first page is still the hacked page. :(
Zachery
10-04-2013, 05:01 PM
So, here is how this works, there are two template tables in the database that contain code: a parsed version for the software, and an unparsed version for you to edit.
Sometimes hackers like to inject the html of their exploit directly into the parsed template table. This fix it, fixes that. It won't fix a style that has template customized via the AdminCP. That would destroy your other custom templates as well/
RS25com
11-14-2013, 08:48 PM
This just totally saved me. Thank you SO much!
Mecho
11-23-2013, 02:02 PM
I'm not sure if this is working for me or not. it never finish!!
Do we need to make any change in the file? like if we changed the admincp folder name?
RS25com
11-23-2013, 07:14 PM
When I ran this script it completed in just about a minute, but I have a small forum.
I do not think you need to make any changes, mine worked fine and I have changed the folder name of my admin CP.
Mecho
11-24-2013, 11:33 AM
Thanks , i have re-uploaded the original file and tried again. 1 hour till now and still not finished!
fasoncho
08-07-2015, 11:01 AM
Thank you so much, I wish I have found this few days back, it would have saved me a lot of wasted time to figure out a solution. Anyway, I am glad I found this in the end - worked like magic :)) The only issue I had is that I had to run it few times, until the script was able to go through all files, because it seems that server wasn't able to take the load. My advice is wait for less active time on your server to run the script and you won't have any issue.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.