Need help with mod 'code' to pull on custom page within vB

Discussion in 'vBulletin Discussions' started by ArnyVee, Sep 20, 2009.

  1. ArnyVee

    ArnyVee Regular Member

    Joined:
    May 25, 2009
    Messages:
    1,264
    Likes Received:
    39
  2. Chani

    Chani Grand Master

    Joined:
    Sep 1, 2009
    Messages:
    884
    Likes Received:
    54
    First Name:
    Chani
    Here's one of three examples in the XML code that pulls a portion of your FORUMHOME to insert the new code:

    Code:
    $find1 = '$navbar';
    $vbulletin->templatecache['FORUMHOME'] = str_replace($find1,$find1.fetch_template('sc_left_top'),$vbulletin->templatecache['FORUMHOME']);
    $find2 = '<!-- / icons and login code -->';
    $vbulletin->templatecache['FORUMHOME'] = str_replace($find2,$find2.fetch_template('sc_left_bottom'),$vbulletin->templatecache['FORUMHOME']);
    $vbulletin->templatecache['headinclude'] .= $vbulletin->templatecache['sc_poll_headinclude'];
    You'd need to create a plugin that would do this on your custom page, also, which then you would replace FORUMHOME in this code to whatever your custom page's TEMPLATE is called.

    I'd have to play around with this in order to get it to work, but this is a start (I've only modified Mods so far and never made my own yet...).
     
  3. Chani

    Chani Grand Master

    Joined:
    Sep 1, 2009
    Messages:
    884
    Likes Received:
    54
    First Name:
    Chani
    Or I wonder if we could:
    a) create an array of templates to make this replacement.
    b) simply add another line to the code with your custom template.

    ?

    Again, I'm not proficient in coding for vB yet. :(
     
  4. Ak Worm

    Ak Worm Grand Master

    Joined:
    May 22, 2009
    Messages:
    979
    Likes Received:
    20
    First Name:
    Corey
    Doesn't vBadvanced let you deploy the colums globally?
    Seen on some sites...
     
  5. ArnyVee

    ArnyVee Regular Member

    Joined:
    May 25, 2009
    Messages:
    1,264
    Likes Received:
    39
    I thought it would be something simple like $sidebar that I'd simply have to add to the custom page. But, I'm guessing that's not the case.

    Still waiting to hear back from the mod's owner to see if he/she has any suggestions.
     
  6. Ak Worm

    Ak Worm Grand Master

    Joined:
    May 22, 2009
    Messages:
    979
    Likes Received:
    20
    First Name:
    Corey
    Im gonna try this out, but wiht vBuadvanced sidebar :D
     
  7. Chani

    Chani Grand Master

    Joined:
    Sep 1, 2009
    Messages:
    884
    Likes Received:
    54
    First Name:
    Chani
    That's the problem with auto templates... :(
     
  8. Chani

    Chani Grand Master

    Joined:
    Sep 1, 2009
    Messages:
    884
    Likes Received:
    54
    First Name:
    Chani
    Yes, that's how I personally would do it, too, but the thing is that every custom page would be {CMPS_filename.php}?pageid={pagename}. A little messy.

    That is how I did it on lacombehypnosis.com/index.php, tho.
     
  9. ArnyVee

    ArnyVee Regular Member

    Joined:
    May 25, 2009
    Messages:
    1,264
    Likes Received:
    39
    Mod creator is not returning contacts and I haven't been able to do this. Chani, what exactly do I need to do to get it done how you did it? :shrug:
     
  10. Chani

    Chani Grand Master

    Joined:
    Sep 1, 2009
    Messages:
    884
    Likes Received:
    54
    First Name:
    Chani
    I'm using vBa CMPS for all of my custom pages.

    Each page can be customized so that they don't necessarily look like the standard portal pages that so many people seem to hate (I don't really understand why).

    I edited the adv_index template to get it the way I wanted.

    With vBa CMPS, you can add simple BB Code pages (basically WYSIWYG), HTML pages, or even custom PHP pages, so it's very versatile. :)
     

Share This Page