HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Question about News Comment Topic

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#27059 (In Topic #6245)
Avatar

Fan in training

How the topic gets inserted

Hiya!  I'd like to first mention that OCportal is one of the most amazing piece of software I've encountered.  I'm at the moment an unregistered user but plan to be one in the near future.  I've downloaded the latest OCportal version and am currently using the latest beta for IPB.  Integrating the two wasn't a problem and done it easily since the tutorials you guys provided was very helpful.  My concern is when I activate the News Comment Topic.  I had no problem inserting the comment stub for the news I've created but the way it gets inserted into the forum had given me some problems.  Once the news is inserted the user for the stub is guest and since the poster is a guest the post is invalid.  Following the link from the news itself leads to the topic but if I look for the topic within the forum itself the topic is missing.  I'm just wondering if it's possible to have the poster of the news topic by the poster of the news.  If this topic has been mentioned before I apologize but I couldn't seem to find it.  Any help is appreciated.  Thanks.
Back to the top
 
Posted
Rating:
#27063
Avatar

Hi :),

since the poster is a guest the post is invalid

the topic within the forum itself the topic is missing

I'm not sure about what's happening to cause these, as we don't own Invision Board and hence can't easily test it. If you'd like to send us a database dump to analyse for IPB changes we need to take into account, please e-mail to chris@ocportal.com.

I'm just wondering if it's possible to have the poster of the news topic by the poster of the news

Within line 203 of sources/forum/ipb2.php change:

Code

'author_id'=>0,'author_name'=>do_lang('SYSTEM',get_lang())
to:

Code

'author_id'=>$member,'author_name'=>$this->ipb_escape($username)

Regards.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#27064
Avatar

Fan in training

Thanks.  That worked really well.  That fixed the topic not showing the author as post starter but then it still won't show on the list of forums.  I'm really sorry if I couldn't send you a db dump because I just upgraded to RC 3 and I really don't know what db changes but I'll see what I can do to send you an updated db dump.
Back to the top
 
Posted
Rating:
#27089
Avatar

Fan in training

Alright.  I just sent you a backup of my testboard for the new version of IPB.  The email I used is miraga715@inbox.com.  Hope that helps.
Back to the top
 
Posted
Rating:
#27098
Avatar

Thanks for sending that. Please try changing line 206 of sources/forum/ipb2.php from:

Code

         $this->connection->query('UPDATE '.$this->connection->get_table_prefix().'forums SET posts=(posts+1), last_post='.strval($time).', last_poster_id='.(string)intval($member).', last_poster_name=\''.db_escape_string($this->ipb_escape($username)).'\', last_id='.(string)intval($tid).', last_title=\''.db_escape_string($this->ipb_escape($title)).'\' WHERE id='.(string)intval($cf),1);
to:

Code

      $test=$this->connection->query_select('forums',array('*'),NULL,'',1);
      if (array_key_exists('newest_title',$test[0]))
      {
         $this->connection->query('UPDATE '.$this->connection->get_table_prefix().'forums SET posts=(posts+1), last_post='.strval($time).', last_poster_id='.(string)intval($member).', last_poster_name=\''.db_escape_string($this->ipb_escape($username)).'\', newest_id='.(string)intval($tid).', newest_title=\''.db_escape_string($this->ipb_escape($title)).'\', last_id='.(string)intval($tid).', last_title=\''.db_escape_string($this->ipb_escape($title)).'\' WHERE id='.(string)intval($cf),1);
      } else
      {
         $this->connection->query('UPDATE '.$this->connection->get_table_prefix().'forums SET posts=(posts+1), last_post='.strval($time).', last_poster_id='.(string)intval($member).', last_poster_name=\''.db_escape_string($this->ipb_escape($username)).'\', last_id='.(string)intval($tid).', last_title=\''.db_escape_string($this->ipb_escape($title)).'\' WHERE id='.(string)intval($cf),1);
      }


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#27109
Avatar

Fan in training

My Reply

 Thanks for the reply but it seems that it won't work.  I've attached my ipb2.php because I really don't know why it's not working.

Attachment
My ipb2.php
» Download: ipb2.php (26 Kb, 294 downloads so far)
Back to the top
 
Posted
Rating:
#27110
Avatar

Please attach a screenshot demonstrating the problem.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#27114
Avatar

Community saint

May I ask why you are running the IPB beta if RC 3 is out?
Just wondering as it may help as well to have the latest version.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#27116
Avatar

Fan in training

Screenshot

 Oops.  Actually it is RC3.  I didn't look at it closely enough. 
Well, this is what happens.  I'll add news in OCPortal then add a comment.  Then I'll go to the topic and it's there as well as the count in the front and forum index but when I go in the forum there's no topics listed.  I did the changes you mentioned but it doesn't seem to work within the forum but it does add the post and topic count globally unlike before.  Thanks for the help.



Back to the top
 
Posted
Rating:
#27118
Avatar

Please try this one. If you're commenting into an existing comment topic, please delete it so that a new one is created – this possible fix will possibly only work against new comment topics.

Attachment
» Download: ipb2.zip (7 Kb, 301 downloads so far)



Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#27122
Avatar

Fan in training

Thanks, man!  That worked like a charm.  I do have another question but it's not a neccesity.  I'd like to know what would I put in if I want 150 characters summary in the post?  Thanks!
Back to the top
 
Posted
Rating:
#27123
Avatar

That would be a non-trivial programming task, as this is not currently possible.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#27124
Avatar

Fan in training

Ah ok.  No problem but thanks anyway.  
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: