MathWizz wrote:
Commit everything but the database config file?
Still, exporting the database takes a while, because we have to export some specific stuff.
The code is also useless without the database.
Offline
jvvg wrote:
SJRCS_011 wrote:
jvvg wrote:
Returning a 403 does expose the URL, because people will see that the page does in fact exist.
The 404 tells the user that there is no page there and they are just wasting their time.though the purpose has sorta already been defeated, cause the site's open source.
True, but it's the same thing on this website, and I tried to copy a lot of the "good" aspects of ScratchR into the Mod Share Platform IV.
Stuff like the dispatcher, using entirely MySQL, caching data, even the ban screen, they all were related to ScratchR.
where is the source code for ScratchR?
EDIT: found it
Last edited by XenoK (2012-10-02 16:03:33)
Offline
XenoK wrote:
jvvg wrote:
SJRCS_011 wrote:
though the purpose has sorta already been defeated, cause the site's open source.True, but it's the same thing on this website, and I tried to copy a lot of the "good" aspects of ScratchR into the Mod Share Platform IV.
Stuff like the dispatcher, using entirely MySQL, caching data, even the ban screen, they all were related to ScratchR.where is the source code for ScratchR?
EDIT: found it
If you think our code is hard to understand, just wait until you see ScratchR.
I am fluent in PHP, but hardly understood anything of ScratchR (mainly because they used CakePHP, not raw PHP).
Offline
Btw, since the code is open-source and a few people are now making their own versions, if you made your own version and have some code you think we need, you are welcome to submit it to us, either in the form of a merge request or a list of changed files.
We will add code as long as it works and has a feature/bug fix we deem meaningful.
Offline
With the new code I get this after submitting the form:
An error was encountered: Failed to create collab
In file /public_html/pages/registercollab.php on line 16
The database reported: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Testing 123)' at line 2
Offline
Zeusking19 wrote:
With the new code I get this after submitting the form:
An error was encountered: Failed to create collab
In file /public_html/pages/registercollab.php on line 16
The database reported: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Testing 123)' at line 2
That should tell you what the problem is.
It appears you forgot to close quotes or something like that.
Offline
jvvg wrote:
Btw, since the code is open-source and a few people are now making their own versions, if you made your own version and have some code you think we need, you are welcome to submit it to us, either in the form of a merge request or a list of changed files.
We will add code as long as it works and has a feature/bug fix we deem meaningful.
I do, but it would require the profile to have more fields, its based off of what i used on eternityx1. I will make some modifications to modshare later, gotta finish eternityx1 alpha (should be out this month)
Offline
jvvg wrote:
Zeusking19 wrote:
With the new code I get this after submitting the form:
An error was encountered: Failed to create collab
In file /public_html/pages/registercollab.php on line 16
The database reported: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Testing 123)' at line 2That should tell you what the problem is.
It appears you forgot to close quotes or something like that.
Still very confusing
Offline
Zeusking19 wrote:
jvvg wrote:
Zeusking19 wrote:
With the new code I get this after submitting the form:
An error was encountered: Failed to create collab
In file /public_html/pages/registercollab.php on line 16
The database reported: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Testing 123)' at line 2That should tell you what the problem is.
It appears you forgot to close quotes or something like that.Still very confusing
What is the code, exactly?
Offline
<?php
if ($ms_config['status'] == 'warning') {
header('Location: /');
die;
}
$page_title = 'Register Collaboration - EzyCollab';
if (isset($_POST['name'])) {
$errors = array();
$result = $db->query('SELECT 1 FROM collaborations
WHERE LOWER(name) = LOWER(\'' . $db->escape($_POST['name']) . '\')') or error('Could not check for existing collabs', __FILE__, __LINE__, $db->error());
if ($db->num_rows($result)) {
$errors[] = 'Collab already exists';
}
if (empty($errors)) {
$db->query('INSERT INTO collaborations(name,description)
VALUES(\'' . $db->escape($_POST['name']) . '\',\'' . $db->escape($_POST['description']) . ')') or error('Failed to create collab', __FILE__, __LINE__, $db->error());
addlog('New Collaboration registered! ' . $_POST['name']);
header('Location: /users'); die;
}
}
?>
<h2>Register a Collaboration</h2>
<h3>Name and Description</h3>
<?php if (!empty($errors)) {
echo '<h4>The following errors need to be fixed:</h4>';
echo '<ul>';
foreach ($errors as $val) {
echo '<li>' . $val . '</li>';
}
echo '</ul>';
} ?>
<form action="/createcollab" method="post" enctype="multipart/form-data">
<table width="335" height="167" border="0">
<tr>
<td height="50">Collaboration Name:</td>
<td><input type="text" name="name" value="<?php echo clearHTML($_POST['name']); ?>" /></td>
</tr>
<tr>
<td>Description:</td>
<td><textarea name="description" cols="100" rows="8"><?php echo clearHTML($_POST['description']); ?></textarea></td>
</tr>
</table>
<input type="submit" value="Register Collab" />
</form>
Offline
Zeusking19 wrote:
Code:
\'' . $db->escape($_POST['description']) . ')')
You forgot to close the quotes.
Use this instead:
\'' . $db->escape($_POST['description']) . '\')')
Offline
A few announcements (already mentioned on the Mod Share Forums):
-Moderator elections are still going on, they will be over on Saturday
-I'll push more source code changes in a few days, however someone might need to remind me
-Once we get a new moderator and he/she is trained, I'm going to take a break from moderating and developing for a few days. I am having some personal problems that are putting a big drain on my mental and emotional resources and moderating/developing Mod Share adds to the stress. It will also give a good experience for our new mod.
Offline
Can I please have the code for the New Flash Player?
Offline
funelephant wrote:
Can I please have the code for the New Flash Player?
Offline
jvvg wrote:
dvd4 wrote:
for about how long will modshare be down ?
It's back up already.
We were just doing a few code improvements.
that was quick
Though the link to the forums in the bar at the top is not working
EDIT:now it's just errors
DOUBLE EDIT:there are just too many errors to report
TRIPLE EDIT:everything is back to normal
Last edited by dvd4 (2012-10-05 16:58:22)
Offline
dvd4 wrote:
jvvg wrote:
dvd4 wrote:
for about how long will modshare be down ?
It's back up already.
We were just doing a few code improvements.that was quick
Though the link to the forums in the bar at the top is not working
EDIT:now it's just errors
DOUBLE EDIT:there are just too many errors to report
I fixed it all. I was trying to make some modifications to make the forums easier to code in the future, but it didn't work.
Offline
jvvg wrote:
dvd4 wrote:
jvvg wrote:
It's back up already.
We were just doing a few code improvements.that was quick
Though the link to the forums in the bar at the top is not working
EDIT:now it's just errors
DOUBLE EDIT:there are just too many errors to reportI fixed it all. I was trying to make some modifications to make the forums easier to code in the future, but it didn't work.
jugging by the number of fatal errors,it's easy to see it didn't work.
Offline
dvd4 wrote:
jvvg wrote:
dvd4 wrote:
that was quick
Though the link to the forums in the bar at the top is not working
EDIT:now it's just errors
DOUBLE EDIT:there are just too many errors to reportI fixed it all. I was trying to make some modifications to make the forums easier to code in the future, but it didn't work.
jugging by the number of fatal errors,it's easy to see it didn't work.
I actually get tons of errors from my successes too while I'm programming them.
I got a cumulative total of over 5000 PHP and SQL errors when writing the first draft of Mod Share IV.
However, I did get some other code working today.
I re-implemented my 3 reports = hide post code.
Now, it will also ban the user that posted it (just like here).
Last edited by jvvg (2012-10-05 17:28:38)
Offline
MathWizz wrote:
Why are you using assembla anyway? I'd use Github any day.
I saw that ScratchR was hosted on Assembla. So, I decided to try it out for Insanity, and I liked it.
That's why I now use it for all of my projects.
Offline