Do you want to delete the users or their journals? I am not sure about the criterion "no longer on the site" but there are functions to delete users based on inactivity and post count.
1. There is a prune users function in the admin control panel under USERS.
Can someone please tell me what is wrong with the below? That module is causing an unclosed tag at the bottom of the page </html and when you click on any link in front page, it sometimes takes you to a blank page with only the rest of the tag > at the top
PHP Code:
$getlateste= $DB_site->query(" SELECT journal_entries.entrytitle,journal_entries.entrydate, journal_entries.entry_id,journal_entries.entrytext, journal_entries.journal_id,journals.journalist,journals.journalist_id FROM ".TABLE_PREFIX."journal_entries AS journal_entries LEFT JOIN ".TABLE_PREFIX."journals AS journals ON (journal_entries.journal_id=journals.journal_id) WHERE journal_entries.entry_active=1 AND journal_entries.private!=1 AND journals.private!=1 ORDER BY journal_entries.entrydate DESC LIMIT 5 "); $countlatest= $DB_site->num_rows($getlateste); $latestentrybits = ""; if($countlatest>0) { while($latest= $DB_site->fetch_array($getlateste)) { $latestentrydate= vbdate($vboptions['dateformat'], $latest['entrydate'], 1); $latestentrytime= vbdate($vboptions['timeformat'], $latest['entrydate']); exec_switch_bg(); if(strlen($latest[entrytitle])>20) { $latest[entrytitle]= "".substr($latest[entrytitle],0,20)."..."; } if(strlen($latest[entrytext])>150) { $latest[entrytext]= "".substr($latest[entrytext],0,150)."..."; } eval('$latestentrybits .= "' . fetch_template('journal_latestentrybits') . '";'); } $DB_site->free_result($latest); } else { $latestentrybits=$vbphrase['adv_no_entries']; }
Tried the importer that was posted a few pages back and ran into some problems with it which Wonko the Sane corrected and you will find reflected in the attached file.
1. Run this query in php my admin to rename your original ryangel journal tables so we still have them in case something goes wrong. If your using a table prefix, you'll need to add that to the query below.
PHP Code:
ALTER TABLE journal RENAME old_journal;
ALTER TABLE journal_comments RENAME old_journal_comments;
ALTER TABLE journal_entry RENAME old_journal_entry;
2. Upload file in admincp and run it. It's already set to use the "old_" prefix we set above.
Thanks to nsanden who made the importer in the first place.
Can someone please tell me what is wrong with the below? That module is causing an unclosed tag at the bottom of the page </html and when you click on any link in front page, it sometimes takes you to a blank page with only the rest of the tag > at the top
PHP Code:
$getlateste= $DB_site->query("
SELECT journal_entries.entrytitle,journal_entries.entrydate,
journal_entries.entry_id,journal_entries.entrytext,
journal_entries.journal_id,journals.journalist,journals.journalist_id
FROM ".TABLE_PREFIX."journal_entries AS journal_entries
LEFT JOIN ".TABLE_PREFIX."journals AS journals ON (journal_entries.journal_id=journals.journal_id)
WHERE journal_entries.entry_active=1 AND journal_entries.private!=1 AND journals.private!=1
ORDER BY journal_entries.entrydate DESC
LIMIT 5
");
$countlatest= $DB_site->num_rows($getlateste);
$latestentrybits = "";
if($countlatest>0)
{
while($latest= $DB_site->fetch_array($getlateste))
{
$latestentrydate= vbdate($vboptions['dateformat'], $latest['entrydate'], 1);
$latestentrytime= vbdate($vboptions['timeformat'], $latest['entrydate']);
exec_switch_bg();
if(strlen($latest[entrytitle])>20)
{
$latest[entrytitle]= "".substr($latest[entrytitle],0,20)."...";
}
if(strlen($latest[entrytext])>150)
{
$latest[entrytext]= "".substr($latest[entrytext],0,150)."...";
}
eval('$latestentrybits .= "' . fetch_template('journal_latestentrybits') . '";');
}
$DB_site->free_result($latest);
}
else
{
$latestentrybits=$vbphrase['adv_no_entries'];
}
Tried the importer that was posted a few pages back and ran into some problems with it which Wonko the Sane corrected and you will find reflected in the attached file.
1. Run this query in php my admin to rename your original ryangel journal tables so we still have them in case something goes wrong. If your using a table prefix, you'll need to add that to the query below.
PHP Code:
ALTER TABLE journal RENAME old_journal;
ALTER TABLE journal_comments RENAME old_journal_comments;
ALTER TABLE journal_entry RENAME old_journal_entry;
2. Upload file in admincp and run it. It's already set to use the "old_" prefix we set above.
Thanks to nsanden who made the importer in the first place.
I tried it out, but here's what happens:
I ran step one with no problem. For step 2, I ran the script and it shows "--Finished" with no errors. But... doesn't the script supposed to make new tables such as "journal_entries", etc? I don't use any prefix for my journal, and I didn't alter the script you provided, so I'm not sure if I'm missing anything