linuxpeter.de
  Batch, Scripts, Tools & Tips > Windows Batch and Tools  
 
Windows Batch and Tools
<< GT-S5230 und Win7 x64bit - So gehts! Übersicht Resize VMWare virtual disk >>
mass text changer for free: Notepad++ to replace text in files Wie man mit Notepad++ schnell viele Textstellen in unterschiedlichen Dateien austauschen kann

The problem:

I updated a phpBB3 forum and received following message when someone wants to answer a poll:

"The submitted form was invalid. Try submitting again."
The resarch on the web brought following solution to me:

Update the template yourself by performing doing a mass FIND:

Code: Select all
    </form>

REPLACE:

Code: Select all
    {S_FORM_TOKEN}</form>

That means, that I had to proceed to my custom style template directory and check every html-page for the </form> tag and change it to the new code-snippet. A quick review lets me count 47 hits in 43 files

First provided solution was that (found here):

If you have Shell (SSH) Access to your server, cd (change directory) to your custom style template directory and run the following command...

 

Code: Select all
perl -pi -w -e 's/<\/form>/{S_FORM_TOKEN}<\/form>/g;' *.html

This will add the S_FORM_TOKEN variable to the template and make it possible to use your custom template.

 

Okay - nice shot - but I don't have direct access in that case and I am on a Windows PC now.
One coffee late, the problem was solved (to be honest: One thought of another coffee was long enough):

First I downloaded the template folder with Filezilla

Tool: Notepad++ (get it here)

1. Open Notepad++
2. Search -> Find in files
3. Set the options to

Find what: </form>
Replace with: {S_FORM_TOKEN}</form>
Filters: *.html
Directory: C:\work\phpBB Poll Problem\template
and a last one "Match whole word only

Confirm the next box and *little-drumroll* it is done.

Upload again, set the default theme back to the customized one and go for a coffee ..!

Hope it helps someone out there ...



Zuletzt geändert von Bikerpete (admin)  am Dec 05 2009  um 1:01 AM
<< GT-S5230 und Win7 x64bit - So gehts! Übersicht Resize VMWare virtual disk >>


Info

Buy me a coffee ...


 
Top! Top!