Would be great to have Statistics (core) support so that the views-count would be imported too and assigned to each posts (if module enabled).
A bit sad to see all Views are set to 0 after import... :P

It shouldn't be too difficult as the views is stored in phpbb_topics.topic_views..so it basically only has to be moved to the right Drupal table...

Comments

NeoID’s picture

No interest in this?

naheemsays’s picture

Unfortunately, no. If put into the module, it would be as a separate step and that would make the module more complicated.

All that would need to be done is for each node, get the number of views for that phpbb post, then insert it into drupal, but this would need to be done after all the other stuff has been imported, so a sepaarate step I think.

Leaving it open as you/others may disagree.

NeoID’s picture

So it could not be integrated into the actual import, right after a phpbb topic has been moved into the Drupal db?
As the module already moves information for the topic like who created it, text and so.. I didn't think it should be too difficult to include the views count table...but I may be wrong...

Fogg’s picture

Version: master » 6.x-1.5

Up!!

I would be interessted in this as well!
Thanks.

Fogg’s picture

Found out that if everything is in one database it is a simple query ;)

Here it is:

insert into drupal_node_counter (nid, totalcount) select drupal_phpbb2drupal_temp_topic.nid, bbtopics.topic_views from drupal_phpbb2drupal_temp_topic, bbtopics where drupal_phpbb2drupal_temp_topic.topic_id = bbtopics.topic_id ;

May be that is helpfull for others as well :)

JeremyFrench’s picture

Version: 6.x-1.5 » 7.x-2.x-dev
StatusFileSize
new2.93 KB

Migrate 2.4 makes this much easier. Patch attached.

JeremyFrench’s picture

StatusFileSize
new1008 bytes

A cleaner patch which works for me.

g10’s picture

Status: Active » Needs work

#7 looks good

maybe add a check if the statistics module is enabled?

if(module_exists('statistics')) $this->addFieldMapping('totalcount','topic_views');
JeremyFrench’s picture

I think that the import framework does that for you but I will test later to make sure there are no errors.

JeremyFrench’s picture

Status: Needs work » Fixed

Have tested with statistics on and off. Seems to work for me. Committed as http://drupalcode.org/project/phpbb2drupal.git/commitdiff/bd48bb6

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.