postback, RE: Adding pages Tutorial

Get help developing custom BBCodes or request one.
Post Reply
User avatar
davye
Registered User
Posts: 20
Joined: Mon Aug 19, 2019 12:49 pm

postback, RE: Adding pages Tutorial

Post by davye »

I created a new page per this https://wiki.phpbb.com/Tutorial.Adding_pages
The page has a simple <form action back to the page, a textarea and buttons to Save or Cancel editing of textarea.

Questions:

how do I detect that it is a post back?
how do I detect it is a get with query string after the URL?
where do I insert java script in the Head for this page only?
Since per the instructions the template is at /phpBB3/language/<lang>/mods/my_language_file.php is what is best way to code the action URL?
How do I grab the contents of the textarea so I can write to file?

thanks
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: postback, RE: Adding pages Tutorial

Post by </Solidjeuh> »

Using this ext to add pages would be much easier: https://www.phpbb.com/customise/db/extension/pages/
User avatar
davye
Registered User
Posts: 20
Joined: Mon Aug 19, 2019 12:49 pm

Re: postback, RE: Adding pages Tutorial

Post by davye »

I currently use pages.
But:
It does not support PHP so to read a text file and write a text file.
Java script does not support r/w files.
thanks for sharing
davye
User avatar
Lumpy Burgertushie
Registered User
Posts: 68553
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: postback, RE: Adding pages Tutorial

Post by Lumpy Burgertushie »

you have to turn on php in templates in the admin panel security settings. not sure if that will work in the pages create with the pages ext but it might.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
davye
Registered User
Posts: 20
Joined: Mon Aug 19, 2019 12:49 pm

Re: postback, RE: Adding pages Tutorial

Post by davye »

it almost works with the pages ext
it does get confused if there is > character in a php string variable.
and I don't believe it executes because it does not echo to the page.
the setting says "Allow php in templates:" well pages ext is really not a template or maybe it is I don't know.
thanks for sharing
User avatar
3Di
Former Team Member
Posts: 16151
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milano 🇮🇹 Frankfurt 🇩🇪
Name: Marco
Contact:

Re: postback, RE: Adding pages Tutorial

Post by 3Di »

No templates, pages are stored in the DB afaik. Not really sure.

There are though FAQs to read there in the contribution topic at the CDB.

Moreover, here things are becoming confusing, either you use and ask help for the tutorial or for the extension.
Both can't be.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
Post Reply

Return to “Custom BBCode Development and Requests”