Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Topic/Post order
Avatar
Juan Sarmiento
Member
Free Members
sp_UserOfflineSmall Offline
Jan 6, 2014 - 4:07 pm

I just migrated my forums from bbPress into SimplePress. I noticed that several of the topics and their reply were made in 2012, yet they appeared at the top of the list. After a little research, I realized that I had edited some of the replies and thus the date of the last post corresponded to my editing and not to the date of the user reply. Is there a way to bypass or override this? namely I do NOT want the date of my editiing to be the date used to bring up my topic to the top of the list (I hope I am clear).

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 6, 2014 - 4:13 pm

Simple:Press does not change the original post date when an existing  post is edited. So I assume this post date change must have been in the data that was imported from the bbPress tables. There are no tools to change it within SP. I think you would need to change this via SQL queries or - to do it more quickly - directly in the database tables.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Juan Sarmiento
Member
Free Members
sp_UserOfflineSmall Offline
Jan 6, 2014 - 4:25 pm

Yes, I did the editing in bbPress and it was imported into SP although the date of the original posts was not changed, the editing seem to create the error in the order.

 

Could you guide me on how to correct the error(s) via SQL or database tables? assume that I am a novice on SP,  and WP but long time computer user. I would appreciate that very much!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 6, 2014 - 4:46 pm

For the record - the database column that is imported from bbPress for the date of a post is literally 'post_date' in the bbPress 'posts' table. Perhaps this is not the column used for sorting when displaying - I do not know.

Simple:Press does not actually use the post date for sorting either. We use the ID of a post. This equates to the same thing in data terms but makes for a quicker query as it is sorting on a primary field of the table. I think what you need to do is find out what bbPress was changing when you made an edit. Might it have possibly been creating a completely new row in the posts table? If so then that would create a new ID which would then automatically - in SP terms - be displayed before older posts.

So somehow you need to juggle the post IDs to get the order you want. Probably not a job for queries. But you could use a tool like phpMyAdmin - which is usually bundled as part of your hosting package. This allows you to browse the database tables and data and edit it as desired. You can choose to look at the SP 'sfposts' table - filter the list on the particular 'topic_id' you want to work with and then change post_ids as you see fit. The rule here, of course, is that IDs are incremented by one for each post made (to the table). So the topic posts will be displayed starting with the lowest ID and workign up to the highest. AND - you can not have two rows in the table with the same ID. They must be unique.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Juan Sarmiento
Member
Free Members
sp_UserOfflineSmall Offline
Jan 6, 2014 - 5:06 pm

So, if I understand you correctly, the database tables are only accessible via the Host service and a tool they provide called phpMyAdmin or something similar? I pressume you are directing me to the Host service for support in this matter. 

Alternatively, I would have to go back to my  bbPress files and try to fix the bug there and start over the process of importing into SP, is this correct?

Please clarify if I did not get it.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 6, 2014 - 7:15 pm

Not at all. I very much doubt your host support will be interested in helping you edit data. phpMyAdmin is commonly exposed in your hosting control panel. The most common of these is probably cPanel where you can find a link to phpMyAdmin in the database section. Other control panels will usually include it as well.

You could certainly go back to your bbPress tables but the same thing applies - changing data manually.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625