Vikestart

Members
  • Content count

    86
  • Joined

  • Last visited


About Vikestart

  • Rank
    IPB Member
  • Birthday 05/15/1995

Recent Profile Visitors


1,960 profile views

Vikestart's Activity

  1. Vikestart added a post in a topic: Putting signature box on "Edit Profile" page   

    It does make sense though as the signature does not appear on your profile, but is rather just something account wide
    But yeah, I guess most people would look for it in "Profile Settings", myself included
  2. Vikestart added a post in a topic: WordPress 4 to IPB   

    Thanks, I've sent an email
    Where would be a suitable place to ask for help in the community?
     
    I really cannot convert unless I can carry that data over. It's way too much data to lose
  3. Vikestart added a post in a topic: WordPress 4 to IPB   

    My website uses both WordPress and IPB at the moment. WordPress is used for most of the website, for articles and pages, while IPB is the forum.
    I don't really like using 2 such big platforms (IPB has IP.Content) if it's not necessary, and so I've had thoughts about converting the WordPress posts and pages to IP.Content in IPB.
     
    However, I have one concern regarding this. A lot of my website is built on Advanced Custom Fields , a plugin for WordPress, to save extra information.
    Is there some way to convert this data as well?
  4. Vikestart added a post in a topic: Pulling list of topics from specific forum and their data to website   

    Thanks! :D That code definitely worked! Now I am able to print the download link ^^
     
    Marked the solution to the original topic of this thread as the solution
  5. Vikestart added a post in a topic: Pulling list of topics from specific forum and their data to website   

    No, I'm not printing_r $outer.... Just look at the code I pasted in my previous post ;)
     
    Using the exact code you provided here, it does not work. It outputs nothing.  :unsure:
     
    Presumably, because as I said, the data is not correctly accessed, as  echo $attachID ; OR  print_r ( $data ); returns nothing.
     
     
     
    If it matters, I'm currently using the code you provided inside the foreach that pulls the topics from the forums. Here is all of my code:
    global $registry; if ( ! $registry->isClassLoaded('topics') ) { $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/topics.php", 'app_forums_classes_topics', 'forums' ); $registry->setClass( 'topics', new $classToLoad( $registry ) ); } $topic_filters = array( 'forumId' => 16, 'topicType' => 'visible', 'getCount' => true, 'sortField' => 'tid', 'sortOrder' => 'desc', 'limit' => 10, 'onlyViewable' => true ); $topics = $registry->getClass('topics')->getTopics( $topic_filters ); if( count( $topics ) ) { echo '<div id="mainmenu_list">'; foreach( $topics as $tid => $topic ) { global $registry; $registry->DB()->build( array( 'select' => 'a.*', 'from' => array( 'attachments' => 'a' ), 'where' => "a.attach_rel_module = 'post'", 'order' => $sort_key, 'limit' => array( $start, $perpage ), 'add_join' => array( array( 'select' => 'p.topic_id', 'from' => array( 'posts' => 'p' ), 'where' => 'p.pid=a.attach_rel_id', 'type' => 'left' ), array( 'select' => 't.*', 'from' => array( 'topics' => 't' ), 'where' => 't.tid=p.topic_id', 'type' => 'left' ) ) ) ); $outer = $registry->DB()->execute(); echo '<div id="mainmenu" style="padding-bottom:10px;">'; echo $topics[$tid]['title'] . '<br><br>'; while( $r = $registry->DB()->fetch( $outer ) ) { $data[] = $r; } print_r ( $data ); echo '</div>'; } echo '</div>'; }
  6. Vikestart added a post in a topic: Pulling list of topics from specific forum and their data to website   

     
    Thanks for the general info :) But I've already said that the database query does not return attach_id
     
    This is what it returns:
     
    [ current_field ] => 0,
    [ field_count ] => 54,
    [ lengths ] => ,
    [ num_rows ] => 0,
    [ type ] => 0
     
    There is no attach_id or attach_rel_id   :unsure:
     
    This code does not output anything at all:
    $registry->DB()->build( array( 'select' => 'a.*', 'from' => array( 'attachments' => 'a' ), 'where' => "a.attach_rel_module = 'post'", 'order' => $sort_key, 'limit' => array( $start, $perpage ), 'add_join' => array( array( 'select' => 'p.topic_id', 'from' => array( 'posts' => 'p' ), 'where' => 'p.pid=a.attach_rel_id', 'type' => 'left' ), array( 'select' => 't.*', 'from' => array( 'topics' => 't' ), 'where' => 't.tid=p.topic_id', 'type' => 'left' ) ) ) ); $outer = $registry->DB()->execute(); while( $r = $registry->DB()->fetch( $outer ) ) { $topicTitle = $r['title']; $postID = $r['rel_attach_id']; $attachID = $r['attach_id']; echo $attachID; } echo $attachID;
  7. Vikestart added a post in a topic: Pulling list of topics from specific forum and their data to website   

    Nonono, I only used  print_r($outer); to check what kind of information it returned from the DB.
     
    What do I put inside the PHP while to output the link / attachment ID? Because to me it doesn't seem like it returns that kind of info :sad:
  8. Vikestart added a post in a topic: Pulling list of topics from specific forum and their data to website   

    Thanks for the fast answer :smile:
     
    It seems I forgot () after DB in  $registry -> DB() -> build.....
     
    Anyway, this code:
    $registry->DB()->build( array( 'select' => 'a.*', 'from' => array( 'attachments' => 'a' ), 'where' => "a.attach_rel_module = 'post'", 'order' => $sort_key, 'limit' => array( $start, $perpage ), 'add_join' => array( array( 'select' => 'p.topic_id', 'from' => array( 'posts' => 'p' ), 'where' => 'p.pid=a.attach_rel_id', 'type' => 'left' ), array( 'select' => 't.*', 'from' => array( 'topics' => 't' ), 'where' => 't.tid=p.topic_id', 'type' => 'left' ) ) ) ); $outer = $registry->DB()->execute(); print_r($outer); Outputs this:
    mysqli_result Object ( [current_field] => 0 [field_count] => 54 [lengths] => [num_rows] => 0 [type] => 0 ) It seems it doesn't contain any information that I could use to print a download link... hmmmmm
  9. Vikestart added a post in a topic: Pulling list of topics from specific forum and their data to website   

    Thanks, but what is $this a substitute for in this context? $registry certainly does not work  :tongue:
     
    There is no context for $this
  10. Vikestart added a post in a topic: Pulling list of topics from specific forum and their data to website   

    I need to get the download links of any attachments in a post, which is probably best done by fetching the attachment ID:
     
    /forums/index.php?app=core&module=attach&section=attach &attach_id=1
     
    That's what I need :smile: However, neither the topic data or post data seem to contain this info. So where is it?  :tongue:
  11. Vikestart added a post in a topic: Pulling list of topics from specific forum and their data to website   

    Using this code gives me access to the first post data:
    foreach( $topics as $tid => $topic ) { $post_filters = array( 'topicId' => $tid, 'forumId' => 16, 'postType' => 'visible', 'getCount' => true, 'sortField' => 'pid', 'sortOrder' => 'asc', 'limit' => 1, 'onlyViewable' => true ); $posts = $registry->getClass('topics')->getPosts( $post_filters ); foreach( $posts as $pid => $post ) { print_r($posts); } } However, the array does not seem to contain any information about the attachment...  :sad:
  12. Vikestart added a post in a topic: Pulling list of topics from specific forum and their data to website   

    Yeah, I just figured it out :smile: It works to access the inner array, yup.
     
    I have one more question.. It seems that $topics does not contain information about attachments.
     
    Though that might be because it's not part of the topic, but part of the individual post. How do I pull post data, from the first post in the topic?
  13. Vikestart added a post in a topic: Pulling list of topics from specific forum and their data to website   

    Awesome :smile: That creates the loop alright
     
    EDIT: Nevermind, I figured out my next challenge :tongue:
    echo $topics[$tid]['title']; Thanks :smile:
  14. Vikestart added a post in a topic: Pulling list of topics from specific forum and their data to website   

    Ah, thanks :) No errors now.
     
    How do I display the topics from a specific forum in a loop? I need to control the formatting inside the loop and where to put data like topic title, topic link, etc.
     
    PHP foreach?
  15. Vikestart added a comment on a blog entry: Corex Responsive Skin Presentation   

    Skin by: IPBPlanet
    That part is way too visible. It should be in the footer, not in the header, considering it's a paid skin.
     
    Of course, credit should be given where credit is due, but with a paid skin, the copyright notice should not attract that much attention.