Integrating dokuwiki inside an existing site - dokuwiki

I'd like to integrate dokuwiki as part of a Bootstrap site, within a div. Is this possible? I've tried a php include:
<?php include('dokuwiki/index.php'); ?>
but this effectively redirects - it just generates a completely new page, replacing the existing html. Note that the Bootstrap plugin doesn't do the job.

For a quick solution, it might be the time to use an HTML Frame.

Related

Netlify form - after submit it redirects to wrong page

I've got a Gatsby.js project that is ran from Netlify. For a contact form I'm using Netlify's api.
The content is multilingual so I've got a contact page on /contact/ and /en/contact/ These obviously share the same code for a form. I've created a successful form submit page on /form-succes/ and /en/form-succes/
But when I'm on the Dutch side and I submit the form I see the url go to /form-succes for a split second, and then it goes (redirects?) to /en/form-succes
It runs well on a local env but not after build on Netlify.
Is this a Netlify issue or did I do something wrong?
This is part of the form:
var pathPrefix is, depending on the language / or /en/
<form
name={"contact"}
method="post"
netlify-honeypot="bot-field"
data-netlify="true"
lassName="contact-forms"
action={`${pathPrefix}form-succes`} // "/form-succes" or "/en/form-succes"
>
// input stuff
</form>
I've ended up makeing two Netlify Forms. One for each language. The documentation as Netlify provides is does not work.
name={'${pathPrefix}-contact'} (use backticks)

Joomla Contact Form (from the ground up)

I'm looking to create a customized contact form in a Joomla 3 site I have created. I know how to write the php code for the form, but I'm unsure of where to place the code.
Ok, the form is located at http://www.theoscorner.com/contact-us. What you see there is only the design, and there is currently no script for the form to submit to. If I wanted to create a new php page for the form to submit to, what is the best method of doing this? For example:
Should I create a completely new php file where the template's index.php file sits, and use a module (instead of an article) to hold the form.
Should I create a new article page, and place my php script in that article?
Should I hard-code my form into a module, and place a php function at the end of the index.php page which gets called when the page is refreshed and the POST values are set.
I'm just looking for any type of guidance I can get right now. I don't want to use a third-party plugin, because I want a little more control than they allow. Thank you for your time.
Just use RS Forms or Contact Enhanced, they are both Joomla extensions available on extensions.joomla.org
There is no need to create your own MVC component.

Use feedburner email subscription without Popup

For my selfhosted Wordpress blog, i wish to add Feedburner email subscription form.
Embed code from feedburner site:
<form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=[BLOGNAME]', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
My issue is, i dont want the popup window to show up. That thing is so 80's stuff.
Instead, is it possible to show the popup contents inline? Using JS or PHP or something?
Check out how div contents change over click here using JS: http://www.willmaster.com/library/web-development/replace-div-content.php
Would be great if something similar could be worked out.
I guess this is easy to do but i have limited knowledge on web designs and php/js/forms.
Thanks in advance.
PS: Please do not suggest plugins. I hate installing plugins unless absolutely necessary.
You can change target="popupwindow" to target="_self" or target="_blank", it can load in current page or go to a new page.

typo3: is there a way to see the pages and its html templates in one place?

in typo3 admin site, I am using TemplaVoilà to make html templates. I have many pages in my site, so I wonder if there is a way that I can check which page is using which html template in one overall page, instead of checking it one by one, something like:
contact page: home.html
employer page: employer.html
...
You can use a hook to add this information in the TemplaVoila s module.

Prevent double form submission when coding in wordpress

I'm currently using wordpress 3.5 and creating a page template of my own. I have my own form in that template and when I click the submit button, it is successfully saved the data to my database. Unfortunately, when I click F5 or refresh button on my browser, It prompts an alert which says there will be a double form submission if I continue.
Usually I prevent this by using "redirect to the same page after submitting" technique. But I can't use header("location: ") to redirect because it generates error: Warning: Cannot modify header information - headers already sent by. Probably there are echos on other wordpress file that prevent redirecting.
Does anyone know how to solve this? Or does anybody know other technique to prevent double form submission beside redirecting?
I've always done this with Javascript:
<?php if(isset($_POST['submit_flag'])){ ?>
<script type='text/javascript'>
window.location='URL';
</script>
<?php } ?>
But now that I think about it, you could easily create another PHP page somewhere in your theme that's not included by the rest of your theme to handle the form data and re-direct back to your form.
I'm also about 98% sure that you can include $wpdb without sending headers by simply requiring "wp-blog-header.php".
There is no output besides in your template file. What would that be? Look at the source code of your website, it's only exactly what you tell Wordpress to create.
So that's first: you can use header("Location: ") at the top of the template file that's called on first. Usually header.php.
Secondly, you can (and usually should) use hooks to handle forms. For example:
add_action( 'init', function() {
// Handle stuff
} );
But perhaps with a different hook (I don't recall any best practice). Tutorials here and there will give you suggestions. In this case you will definitely call header("Location: " ) before there is any output. Your theme hasn't even been involved yet.