WordPress.org

Ready to get started?Download WordPress

Forums

vBulletin Style Page Navigation (47 posts)

  1. jackiefg
    Member
    Posted 10 years ago #

    Could you tell us how we'd use the code? For example, would we create a new .php page with that code in it and then do an include page_navigation.php somewhere in our index... and if so, would it be included at the top of the page, in the loop, etc.
    I know everybody's not as stupid as I am about php, but I'm sure there are some who would like to know (me included).

  2. davidchait
    Member
    Posted 10 years ago #

    You can paste it into one of the existing php files, or put it in it's own php file (wrapped with the < ? p h p ... ? > stylings, without spaces... ;) ). Then inside the loop add a callout to page_navigation, like any of the other php calls/'tags' in the template.
    If you need a full example, let me know. ;)
    d

  3. mrwok
    Member
    Posted 10 years ago #

    You can create a my-hacks.php file, don't forget the <?php, and the ending ?> tags. Go to admin, and set your general options to allow hacks. and then call his function.
    page_navigation($before='', $after='', $prelabel='« ', $nxtlabel=' »')

  4. Anonymous
    Unregistered
    Posted 10 years ago #

    sorry, i didn include a tutorial on how to install because I dun really know how my hacks work. I just put it in my template-functions.

  5. Lester Chan
    Member
    Posted 10 years ago #

    ops tt was me

  6. Lester Chan
    Member
    Posted 10 years ago #

    wp-vbnavi.php ( Demo | Download)
    Renamed the file on my server.

  7. Jean-Pierre Michaud
    Member
    Posted 10 years ago #

    GamerZ.. i installed your hack without success in the 1.1b (02-24's version), and i have no reasult... not sure if it's my installation or the version, can you head up a light on it ?! instructions ?!... i read the code but not able to find the problem.

  8. Nick Momrik
    Member
    Posted 10 years ago #

    It needs to be outside "the loop" I think....at least that is where I have mine. I'm using the latest and greatest CVS code and just implemented this hack. Works great!

  9. Lester Chan
    Member
    Posted 10 years ago #

    nexia: you need to make sure your "what_to_show" under options > Other Options are set to post_paged.

  10. Jean-Pierre Michaud
    Member
    Posted 10 years ago #

    AHHHH .. .this is not written in the "docs" .. ;)
    now it's working great...

  11. Lester Chan
    Member
    Posted 10 years ago #

    hey nexia, sorry about that, I didn't really write an instructions for it, maybe i shall do it soon. =D

  12. PeterBlue
    Member
    Posted 10 years ago #

    Working great! GamerZ, thank you!!!!! :)

  13. Anonymous
    Unregistered
    Posted 10 years ago #

    After tries & errors I finally got it to work.
    Thanks.

  14. Anonymous
    Unregistered
    Posted 10 years ago #

    If anyone needs help please let me know or have a look http://www.forceforge.com .

  15. Lester Chan
    Member
    Posted 10 years ago #

    xtool, what error you have?

  16. Anonymous
    Unregistered
    Posted 10 years ago #

    The variable for siteurl has changed in the 3/8/04 nightly.
    it was: $siteurl
    now: get_settings('siteurl')
    this hack doent work now.
    Does anyone have a fix?
    thanks

  17. xtool
    Member
    Posted 10 years ago #

    Yes is there a fix?
    It's not working right. I am using WP 1.2 alpha. If I click "Last" or any pages, it will redirect me to my site's root directory. Any idea?
    Please have a look at it: http://www.forceforge.com
    Thanks in advance.

  18. Lester Chan
    Member
    Posted 10 years ago #

    Okie guys, updated the code
    get it here
    http://www.lesterchan.net/portfolio/programming/wp-vbnavi.txt

  19. OperaManiac
    Member
    Posted 10 years ago #

    what did it fix/add?

  20. xtool
    Member
    Posted 10 years ago #

    Thanks GamerZ! You're da Man!
    ...but can you tell us what was the problem and the fixes so that way we... I can learn.
    Thanks again.

  21. Lester Chan
    Member
    Posted 10 years ago #

    i just fix using get_settings() instead of $variable to form the URL =D

  22. Anonymous
    Unregistered
    Posted 10 years ago #

    yuyuy

  23. Anonymous
    Unregistered
    Posted 10 years ago #

    This doesn't seem to work with the latest nightly build. :(

  24. Jack
    Member
    Posted 10 years ago #

    I don't get this to work.
    I have <?php wp_get_archives('type=postbypost&format=link','limit=5'); ?> in the head of my indexpage, and it litte further down the page <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <? page_navigation()?>
    But it doesn't work. What am I doing wrong here? It's supposted to be for my category pages.

  25. Jack
    Member
    Posted 10 years ago #

    :) :) You can't find it because i'm still testing etc. (coming from MT).
    But you can see the testversion here: http://www.spoenk.nl/weblog/index.php
    I got it working now (I totally forgot about the post_paged option), and had to change all the get_settings('siteurl') in get_settings('home') because I keep my wordpressfiles and weblog in parallel folders.
    But thanks for your willingness to help :)

  26. Beel
    Member
    Posted 10 years ago #

    Yes, I actualy did find it earlier - before you lost your css :-("Now where did I put that dang thing?")

  27. Jack
    Member
    Posted 10 years ago #

    I didn't loose my css :). Because I keep my weblog and wordpressfiles in seperate/parallel folders, each time before I log out I have to reset my blogURL to the wordpressfolder, otherwise I won't be able to login again. Then, after loging in, each time I have to reset the URL back again to the /weblog folder so that the index.page fetches the wright css.
    It's a bug in WordPress. Blog in root and wp in /wordpress works ok, but not in parallel folders. I reported this already in the beta-discussion section. So each time I'm on line the website looks good, otherwise it looks bad :( I hope this will be fixed soon...

  28. Jack
    Member
    Posted 10 years ago #

    Suggestion/question: Would it be possible (and how...) if the number of posts per page is set to 10, to have a list of the titles of the posts in that particular page (1,2,3 etc.) in a column next to the page with anchored links to each post in the page?
    I think this would be a very nice feature. I keep my menu in a short and through css fixed div (except for IE of course), so you can always jump to a previous postition in the page without the need of scrolling and searching for what you just read.
    Needless to say I see it all before me with php-eyes wide shut

  29. Jack
    Member
    Posted 10 years ago #

    This hack works for all the posts, so also my monthly pages are set to a maximum of 10 posts now, and I don't want that. So I set the post-paged to 100 for the months to display in total without paging, and in the bulletin-page-navigation.php I used to following lines to force the function to use not 100 but 10 posts per page.
    $posts_per_page = 10;
    ( I put this right after the
    global $p, $what_to_show, $request, $posts_per_page, $wpdb;
    global $HTTP_SERVER_VARS, $paged;
    global $querystring_start, $querystring_equal, $querystring_separator;)
    and further on I even manually changed this line
    $max_page = ceil($numposts / 10) ;
    But it doesn't work. The months show up correctly now, but for the categories I don't see the pagenumbers?
    What am I doing wrong here?
    (www.spoenk.nl/weblog)

  30. Jack
    Member
    Posted 10 years ago #

    I kept busy and found the answer, aaaaaaaall by my self :)
    Not really. I bumped into this post http://wordpress.org/support/index.php?action=vthread&forum=6&topic=2766&page=0 and that did exactly what I was searching for. :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.