MyBB-Plugins Forums

Full Version: Rename newpoints.php to experience.php?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I want to use NewPoints as a kind of experience points.

So I would like to know if it somehow is possible to rename newpoints.php to experience.php?
It is, but you'll need to replace newpoints.php everywhere it appears, being it in templates or/and code.
Would there be any easier way?

Maybe by rewriting urls, so that it seems to be that address? And then change the links from where ever it should be, cause when I try to do it the other way, I get errors in the admin panel, when I try to go to the plugin page.
You can redirect from newpoints.php to the new file using htaccess, it seems to work (I only tried once and without testing too much, tough).
URL rewrites would work but you wouldn't be renaming newpoints.php to experience.php, just redirecting (or "rewriting" the name).
Actually how I did it was, just copied "newpoints.php" with a new filename, so there were two files.

Then added the redirection.
If you have .htaccess you don't need a duplicate file.
I tried to do this as well, worked for links. But when I tried to send points with the RewriteRule, it woudn't work.

This is what I used;

DirectoryIndex index.php
RewriteEngine On
RewriteRule ^points\.php$ /newpoints.php [L]
RewriteCond %{HTTP_HOST} ^envision\.x10\.mx$ [OR]
RewriteCond %{HTTP_HOST} ^www\.envision\.x10\.mx$
RewriteRule ^newpoints\.php$ "http\:\/\/envision\.x10\.mx\/points\.php" [R=301,L]

Any ideas?
That is no longer NewPoints support, sorry. If you need help with .htaccess rules, look around the web or ask somewhere else, this is not the place to do so. I don't really know how rewrites are handled for a POST method but take a look here:
http://www.helicontech.com/forum/14401-R..._data.html

May help you, or not.
That did not help, I'll tell you what I'm basically trying to do.

I want to make a quick submit form on popup.

So far, this is what I have.

Code:
<?
echo
'<html>
<title>Quick Send Points</title>
<body>
<form method="POST" action="newpoints.php">
<input type="hidden" value="{$mybb->post_code}" name="postcode">
<input type="hidden" value="do_donate" name="action">
<table class="tborder" cellspacing="1" cellpadding="4" border="0">
<tbody>
<tr>
<td class="thead" colspan="2">
<strong>Send</strong>
</td>
</tr>
<tr>
<td class="trow1" width="50%">
<strong>User:</strong>
<br>
<span class="smalltext">Enter the user name of the user you want to send points to.</span>
</td>
<td class="trow1" width="50%">
<input class="textbox" type="text" value="" name="username">
</td>
</tr>
<tr>
<td class="trow2" width="50%">
<strong>Amount:</strong>
<br>
<span class="smalltext">Enter the amount of points you want to send to the user.</span>
</td>
<td class="trow2" width="50%">
<input class="textbox" type="text" value="" name="amount">
</td>
</tr>
<tr>
<td class="trow1" width="50%">
<strong>Reason:</strong>
<br>
<span class="smalltext">(Optional) Enter a reason for sending.</span>
</td>
<td class="trow1" width="50%">
<input class="textbox" type="text" value="" name="reason">
</td>
</tr>
<tr>
<td class="tfoot" width="100%" align="center" colspan="2">
<input type="submit" value="Submit" name="submit">
</td>
</tr>
</tbody>
</table>
</form>
</body>
<html>';

Gives this error.
Code:
Authorization code mismatch. Are you accessing this function correctly? Please go back and try again.
Pages: 1 2