vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   Ryangel's vB3 Journal -> vBJournal 1.0.0 Importer (https://vborg.vbsupport.ru/showthread.php?t=79005)

Oblivion Knight 03-28-2005 10:00 PM

Ryangel's vB3 Journal -> vBJournal 1.0.0 Importer
 
Introducing.. Jim Port! :D


[high]Who is Jim Port?[/high]
Jim Port is the name that I gave to the import script..
Journal Import -> admincp/jimport.php -> Jim Port


[high]What can Jim Port do for me?[/high]
He will automatically do the following:
  • Backup Ryangel's Journal database tables
  • Revert database changes made by Ryangel's Journal
  • Remove Ryangel's Journal templates
  • Remove Ryangel's Journal phrases
  • Install vBJournal database tables
  • Alter database tables for vBJournal compatability
  • Transfer data from Ryangel's Journal to vBJournal
  • Install vBJournal phrases
  • Install vBJournal templates

[high]Are there any known issues to using Jim Port?[/high]
Obviously, the database tables aren't 100% compatible with each other.. Jim Port cannot identify which of the journal entries is the journal's latest, and therefore no data is inserted in to the latest entry title or date fields. This was a worthy sacrifice as the majority of users will update their journals on a common basis anyway, and once a new entry is posted the latest entries will continue to function as intended.

Jim Port currently cannot strip the slashes from entry or comment titles and text. As such, journal.php must be modified slightly in order to display these correctly and the edits have been documented in the readme. These edits will not have any side-effects on any new comments or entries made beyond this point.

Also, during the beta testing phase it was reported that any deleted journals (ie. if a user had deleted all of their entries) would still show up as empty, but the comments from these deleted entries would continue to be displayed in the Recent Comments section of the journal. There is no easy fix for this other than manual deletion..


[high]What versions of Ryangel's Journal is Jim Port compatible with?[/high]
To cut a long story short, I don't know 100%. However, as long as you are running a ported vB3 version of Ryangel's Journal and not the original vB2 version, then this should work as it was intended.. I tested it on version 1.1d and at least one of the beta testers tried it on version 1.2 and both appeared to import flawlessly.


[high]What versions of vBulletin is Jim Port compatible with?[/high]
It should work on ANY version of 3.0.0..


[high]Jim Port looks similar to the v3arcade Installer, are they twins?[/high]
Yup, the journal import script is heavily based on the v3arcade Installer by John. I've tried to get in touch with him on numerous occasions about making sure it was ok with him, but currently remain unsuccessful. Should he wish me to cease using it, the zip will be removed and I will attempt to try and write this in some other way.

I feel that I have learnt a lot from his work, and would like to thank him for this.


[high]Miscellaneous notes about Jim Port[/high]
Lines of code in admincp/jimport.php: 1816
Days to write: 4
Private beta testers: tmhall, DanielP (vb.nl)

The backed up Ryangel's Journal database tables *ARE NOT* removed automatically. This was intentional in case admins wanted something to fall back on should anything go wrong, and can be deleted manually if you are satisfied with the import process.


[high]I'd like to buy Jim Port a beer![/high]
Well, you can't buy him one as he's nothing but code, however, if you'd like to buy me a beer my Paypal address is [high]obk395@yahoo.co.uk[/high]. All donations will be drunk with thanks! ;)

Polo 03-29-2005 12:58 PM

Thanks Oblivion Knight, I have seen alot of members ask for this.. :) Pretty sure they will be happy with this importer ;)

sabret00the 03-29-2005 01:59 PM

Congratulations on the release, nice work :)

Cloud-Warrior 03-29-2005 04:48 PM

Great job OBK, just editing files now... Spotted this in the readme.txt:

Quote:

$text= unhtmlspecialchars(stripslashes($text));
$entry['date']= vbdate($vboptions['dateformat'], $entry['entrydate'], 1);
$entry['time']= vbdate($vboptions['timeformat'], $entry['entrydate']);
It doesn't exist, so i guess it should be:

Quote:

$text= parse_bbcode2($entry['entrytext'], 0, $setting['allow_imgcode'], $setting['allow_smilies'], $setting['allow_bbcode']);
$entry['date']= vbdate($vboptions['dateformat'], $entry['entrydate'], 1);
$entry['time']= vbdate($vboptions['timeformat'], $entry['entrydate']);
And:

Files to edit: (3) - profile.php, includes/functions.php,
includes/adminfunctions_template.php, journal.php (vBJ)

Remove the admin... one.

Oblivion Knight 03-29-2005 05:42 PM

Quote:

Originally Posted by Cloud-Warrior
Great job OBK, just editing files now... Spotted this in the readme.txt:
Code:

$text= unhtmlspecialchars(stripslashes($text));
$entry['date']= vbdate($vboptions['dateformat'], $entry['entrydate'], 1);
$entry['time']= vbdate($vboptions['timeformat'], $entry['entrydate']);

It doesn't exist, so i guess it should be:
Code:

$text= parse_bbcode2($entry['entrytext'], 0, $setting['allow_imgcode'], $setting['allow_smilies'], $setting['allow_bbcode']);
$entry['date']= vbdate($vboptions['dateformat'], $entry['entrydate'], 1);
$entry['time']= vbdate($vboptions['timeformat'], $entry['entrydate']);


It should exist, as you're adding the top line of that code as an earlier edit..

I realise that these edits aren't in the correct order, but I was documenting them as I edited the necessary code.


Quote:

Originally Posted by Cloud-Warrior
Files to edit: (3) - profile.php, includes/functions.php,
includes/adminfunctions_template.php, journal.php (vBJ)

Remove the admin... one.

Thanks, that edit was removed from the RC2 private beta for this release as it wasn't necessary.

FleaBag 03-29-2005 09:01 PM

Hell yeah, you know I've been waiting for this one. My site's members are gonna be wetting themselves now I can install your script! Thanks a lot, I really mean that!

FleaBag 03-29-2005 09:15 PM

OK here we go, heh. Any idea what this means mate? As I certainly don't...

Quote:

Database error in vBulletin 3.0.5:

Invalid SQL:
UPDATE journals, bjournal_commentcount
SET journals.commentcount = bjournal_commentcount.count
WHERE journals.journal_id = bjournal_commentcount.journal_id

mysql error: You have an error in your SQL syntax near ' bjournal_commentcount
SET journals.commentcount = bjournal_commentcount.coun' at line 2

mysql error number: 1064

Date: Tuesday 29th of March 2005 04:01:03 PM
Script: http://dragonninja.co.uk/admin/jimport.php
Referer: http://dragonninja.co.uk/admin/jimport.php

Oblivion Knight 03-30-2005 06:18 AM

Are you using a table prefix? What is your MySQL version?

Cloud-Warrior 03-30-2005 06:22 AM

Quote:

Originally Posted by Oblivion Knight
It should exist, as you're adding the top line of that code as an earlier edit..

I realise that these edits aren't in the correct order, but I was documenting them as I edited the necessary code.


Thanks, that edit was removed from the RC2 private beta for this release as it wasn't necessary.

Nice one - my mistake - I was looking for order :)

I'm having problems with step seven of the script, due to the huge tables I have... I've had to change the first two SELECT queries to:

SELECT u.username, u.ipaddress, j.journal_id FROM user as u left join journals as j on u.userid=j.journalist_id WHERE j.journal_id<>"";

SELECT u.username, u.ipaddress, c.comment_id FROM user as u left join journal_comments AS c ON u.userid = c.commenter_id WHERE c.comment_id <> "";

Otherwise they run for way too long and the script times out.

Oblivion Knight 03-30-2005 06:39 AM

Quote:

Originally Posted by Cloud-Warrior
I'm having problems with step seven of the script, due to the huge tables I have... I've had to change the first two SELECT queries to:

SELECT u.username, u.ipaddress, j.journal_id FROM user as u left join journals as j on u.userid=j.journalist_id WHERE j.journal_id<>"";

SELECT u.username, u.ipaddress, c.comment_id FROM user as u left join journal_comments AS c ON u.userid = c.commenter_id WHERE c.comment_id <> "";

Otherwise they run for way too long and the script times out.

Aha, the script hasn't been tested on a huge forum before, so thanks for the feedback. I'll update them shortly..

Other than that, did everything work ok for you? :)

Cloud-Warrior 03-30-2005 07:26 AM

Still checking it out but looks good so far...

I had to update journal titles with a "update journals set journalname=concat(journalist,"'s Journal") where 1;"...

Now to figure out the reverse date ordering (people don't like that); I've just added my RSS 1.0 output bit as well...

Thanks OBK - I owe you a pint :)

Oblivion Knight 03-30-2005 07:34 AM

Quote:

Originally Posted by FleaBag
OK here we go, heh. Any idea what this means mate? As I certainly don't...

Try the latest zip (v0.3 PUBLIC BETA).

I'm hoping that I've cracked this one for you.. :)


Quote:

Originally Posted by Cloud-Warrior
I had to update journal titles with a "update journals set journalname=concat(journalist,"'s Journal") where 1;"...

You don't have to do that, though it's a nice idea. By default when a Journal is created in vBJournal if no title is entered it automatically becomes "x's Journal" without anything being entered in to that field.


Quote:

Originally Posted by Cloud-Warrior
Now to figure out the reverse date ordering (people don't like that); I've just added my RSS 1.0 output bit as well...

I think this is what you're looking for..

https://vborg.vbsupport.ru/showpost....&postcount=552


Quote:

Originally Posted by Cloud-Warrior
Thanks OBK - I owe you a pint :)

I'll hold you to that! ;)

womensden 03-30-2005 02:10 PM

where can I dl RyAngel's journal? I've been looking for a journal program (it's taking a while to make our own as we dont have much spare time).

Oblivion Knight 03-30-2005 02:41 PM

Quote:

Originally Posted by womensden
where can I dl RyAngel's journal? I've been looking for a journal program (it's taking a while to make our own as we dont have much spare time).

It wasn't publicly released here because permission was never received from Ryangel (the original author) to port his vB2 version to vB3.

zetetic 03-31-2005 08:04 PM

Quote:

Originally Posted by womensden
where can I dl RyAngel's journal? I've been looking for a journal program (it's taking a while to make our own as we dont have much spare time).

The purpose of this hack is to import data from RyAngels journal into vBJournal, which I believe is currently the best supported journal system. You might want to give it a look.

womensden 03-31-2005 09:17 PM

ahhh... ok. thanks for clearing that up.

zetetic 03-31-2005 09:19 PM

Sure thing. :)

Cloud-Warrior 04-01-2005 07:30 AM

OBK - question - what are the edits to journal.php for?

Oblivion Knight 04-01-2005 07:36 AM

Quote:

Originally Posted by Cloud-Warrior
OBK - question - what are the edits to journal.php for?

Ryangel's Journal stores your entries and comments with the slashes and some weird HTML encoding still in the table for both the title and the text. For example: [disable](It\'s warm in here &gt;_&gt;)[/disable]

The journal.php edits are done to make these display correctly by stripping the slashes and unencoding the weird HTML stuff on-the-fly. So in the above example, this now shows as: (It's warm in here >_>)

Cloud-Warrior 04-01-2005 10:02 AM

Okay :) I was just checking, as I had to make some changes to my RSS 1.0 exporter for vBJournal and I had to add some of those strip slashes things in as well... Thanks.

zetetic 04-01-2005 05:24 PM

Quote:

Originally Posted by Oblivion Knight
Ryangel's Journal stores your entries and comments with the slashes and some weird HTML encoding still in the table for both the title and the text. For example: [disable](It\'s warm in here &gt;_&gt;)[/disable]

The journal.php edits are done to make these display correctly by stripping the slashes and unencoding the weird HTML stuff on-the-fly. So in the above example, this now shows as: (It's warm in here >_>)

Oops, that just caused me a little confusion when I went to modify journal.php to parse bbcode in the recent comments section, as I explain here.

Another thing I just noticed is that I ended up with duplicate "jBuddy List" sections in the memberlist template. You might want to tell people to skip that template edit.

Oblivion Knight 04-01-2005 06:10 PM

Quote:

Originally Posted by tmhall
Another thing I just noticed is that I ended up with duplicate "jBuddy List" sections in the memberlist template. You might want to tell people to skip that template edit.

Do you mean the modifylist template? Ryangel's Journal doesn't edit the memberlist template IIRC.

I'll make a note of it.. :)
I forgot since I've edited the Journal to use the Buddy List instead of using a separate jBuddy List.

Reeve of shinra 04-01-2005 06:11 PM

Cloud-Warrior -- Is the RSS exporter for the vbjournal released here? And what changes did you have to make?

zetetic 04-01-2005 11:02 PM

Quote:

Originally Posted by Oblivion Knight
Do you mean the modifylist template? Ryangel's Journal doesn't edit the memberlist template IIRC.

I'll make a note of it.. :)
I forgot since I've edited the Journal to use the Buddy List instead of using a separate jBuddy List.

Doh! Yeah, that's what I meant. I also just posted on Anton's thread about a few missing phrases in his install routine that are missing in yours too.

Under Control Panel Stop Messages:

journal_mood_deleted_successfully --> Mood deleted successfully.
journal_mood_updated_successfully --> Mood updated successfully.
journal_inserted_mood_successfully --> Inserted {1} successfully.

:)

zetetic 04-02-2005 01:11 AM

Also I'm pretty sure RyAngel's hack came with a journalupdate.php file in forum root that can be deleted. If it didn't come with that hack I'm not sure where I got it.

Just let me know when I've pestered you enough. :D

Oblivion Knight 04-02-2005 06:50 AM

It's all useful feedback Tom, cheers! :)

I'll add those phrases to the importer for future use. Ryangel's Journal did come with the journalupdate.php file, but you only needed to use it if you'd previously used the vB2 version of the journal on your database. I'll make a note of it though..


Zip will be updated shortly..

zetetic 04-02-2005 12:23 PM

Excellent. :)

FleaBag 04-02-2005 01:43 PM

Hey Oblivion_Knight, what's the URL of the step I need to go to to carry on from where I left off with the updated file?

Oblivion Knight 04-02-2005 01:50 PM

Quote:

Originally Posted by FleaBag
Hey Oblivion_Knight, what's the URL of the step I need to go to to carry on from where I left off with the updated file?

I hope you didn't test this on your live forum, because ideally you need to run the importer from scratch with Ryangel's Journal tables set to their original names.. :nervous:

Please note that the changes mentioned on post #24 and beyond have not yet been implemented, I haven't had the time. When they are, the version will be changed to v0.31..

FleaBag 04-02-2005 01:51 PM

Yep on a live board, I've always had the luck of the Irish before lol. So am I screwed?

Oblivion Knight 04-02-2005 02:04 PM

Quote:

Originally Posted by FleaBag
Yep on a live board, I've always had the luck of the Irish before lol. So am I screwed?

Never, ever use a beta hack on your live board without testing it first.. :p
It's very likely that any hack released in a beta state will be changed at least once before released as "final".


You're not completely screwed, but you're making life difficult for yourself.. Remove the database tables journal_comments, journal_entries, journal_moods, journal_settings and journals. Once you've done that, remove the "b" from the database tables bjournal, bjournal_comments and bjournal_entry. If bjournal_commentcount exists, remove it.


You may need to run these queries too..
[sql]ALTER TABLE user DROP canhavejournal[/sql][sql]ALTER TABLE usergroup DROP journalpermissions[/sql][sql]ALTER TABLE session DROP injournal[/sql]After that, you should be able to run the import script once again. You may want to wait for the next version though.. I'll have it done within the next hour or so.

FleaBag 04-02-2005 02:06 PM

Thanks a lot for your support, especially considering I went ahead and did something blatantly dumb that I know I shouldn't have. The problem I have is that my vB database is 400 meg, it's a bit of a bugger to back up as regularly as I'd like to - my host keeps backups on my behalf but his response time is 1-3 weeks. But I will learn from my mistakes! I'll get onto undoing my actions as per your advice and will wait for the new release. ;)

Looking forward to getting your journal running!

Oblivion Knight 04-02-2005 02:30 PM

Quote:

Originally Posted by tmhall
Under Control Panel Stop Messages:

journal_mood_deleted_successfully --> Mood deleted successfully.
journal_mood_updated_successfully --> Mood updated successfully.
journal_inserted_mood_successfully --> Inserted {1} successfully.

:)

journal_inserted_mood_successfully already exists, but the others have been added in v0.31 of the importer.. :)


Quote:

Originally Posted by FleaBag
Thanks a lot for your support, especially considering I went ahead and did something blatantly dumb that I know I shouldn't have. The problem I have is that my vB database is 400 meg, it's a bit of a bugger to back up as regularly as I'd like to - my host keeps backups on my behalf but his response time is 1-3 weeks. But I will learn from my mistakes! I'll get onto undoing my actions as per your adive and will wait for the new release. ;)

Looking forward to getting your journal running!

Don't worry about it, everyone has different circumstances.. ;)
However, before using any script that automatically runs queries on your live database I would recommend backing up beforehand and/or testing it on a seperate test board.

vBJournal isn't my Journal script, but hopefully I will be working with AN-net at some point on the project.

v0.31 of Jim Port is now released.. :)

FleaBag 04-02-2005 02:32 PM

Aha sorry a little confusion on my part there. That's all those brain cells dying from substance abuse lol. It actually just occured to me that I can just make a dump of those tables as a backup... Silly me. Will fire it up in a moment!

FleaBag 04-02-2005 03:25 PM

Success! I had to edit the jimport a little to remove certain steps but it all worked like a dream from thereon in! I've now got the journal script up and running 100% with all of my existing entries. Thanks a whole lot Oblivion_Knight. :)

Oblivion Knight 04-02-2005 05:30 PM

No problem, and for future reference there's no "_" in my name.. ;)

FleaBag 04-03-2005 10:15 AM

Oops... What am I like lol. :D

zetetic 04-03-2005 03:36 PM

I can't remember if I created this myself or if it was part of RyAngel's hack, but I had a phrase called viewing_journals --> Viewing Journals and matching entries in functions_online so Who's Online would be accurate when people were in journals. That phrase seems to have been removed by the importer.

Oblivion Knight 04-03-2005 06:02 PM

Quote:

Originally Posted by tmhall
I can't remember if I created this myself or if it was part of RyAngel's hack, but I had a phrase called viewing_journals --> Viewing Journals and matching entries in functions_online so Who's Online would be accurate when people were in journals. That phrase seems to have been removed by the importer.

Yup, the importer removes any phrases that contain the words "journal" or "jbuddy".

I'm afraid you'll have to re-add these (they sound like custom ones to me).

zetetic 04-03-2005 06:22 PM

No worries, already taken care of. Thanks. :)


All times are GMT. The time now is 03:18 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01375 seconds
  • Memory Usage 1,853KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete