WordPress.org

Ready to get started?Download WordPress

Forums

Struggling with Since Last Visit (55 posts)

  1. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Here is where I have all the codes:
    <?php $wplastvisit_output = "javascript"; require('wp-content/plugins/wp-last-visit.php'); ?>
    </head>

    =========
    <div class="post">
    <h3 class="storytitle" id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?>&nbsp;&nbsp;<script type="text/javascript">slvShowNewIndicator(<?php print(mysql2timestamp($post->post_date)); ?>);</script></h3>

    ==========
    And in 'wp-comments.php'
    <li id="comment-<?php comment_ID() ?>">
    <?php comment_text() ?>
    <script type="text/javascript">slvShowNewIndicator(<?php print(mysql2timestamp($comment->comment_date)); ?>);</script>

    Does this help at all ?

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    And in index.php again;
    <div id="menu">

    • <script type="text/javascript">slvBanner();</script>

  3. jbent
    Member
    Posted 9 years ago #

    Don't know if this will help, but here's my server config:
    FreeBSD 4.8 / PHP 4.3.4 / Apache 1.3.29 / MySQL 4.0.18 / WP 1.2

  4. jbent
    Member
    Posted 9 years ago #

    Just an update. I installed a fresh WordPress 1.2 with a fresh SLV plugin on my Mac OS X server here at home (w/o any tweeks or mod_rewrite) and got the same results. I hope I am wrong, but the plugin simply seems to be broken.

  5. hugh
    Member
    Posted 9 years ago #

    I am having the same problem to the tee. I am using rewrite also, though I am unsure of the importance of that common trait.
    I did notice that one of the people helping has a different line added to their index file that doesn't include the js argument. but that argument is in the readme file.
    I would like to get last visit working, but I am unsure how to at this point, perhaps something needs to be changed in the code.
    Thanks

  6. Estara
    Member
    Posted 9 years ago #

    Yup, same problem here. As I posted in the Entry to Alex's WP 1.2 plugins (http://wordpress.org/support/?action=vthread&forum=10&topic=5231&page=2#post-7). Nothing I did worked, and the server host people don't know or say what to do either.
    Podz tried to help me too, but unfortunatley it still didn't work.

  7. davidcrickett
    Member
    Posted 9 years ago #

    It's not working here neither. :-(

  8. PaulV
    Member
    Posted 9 years ago #

    Well here goes...

    I have attempted the install of this plugin to no avail. I first tried to make sense of the instructions in the txt file that comes with the latest download. That did not work. Then after reading pages and pages of try this and do that, I found this page and follow exactly what "podz" has done with the code.

    However, it still seems to be "bugy"
    http://somethin-tropical.epaulv.com

    My guess is that the template that I am using is causing conflict or could be that WP is installed on a sub domain or I have completely messed it up. lol I am an Aquaculurist with limited knowlege of web design so even my logical thinking does not apply here.

    I must say to the WordPress Team - well done! The best and most user friendly blog application I have used. Thank you for thinking of us non techie peeps.

    Any assistance in resolving this issue is greatly appreciated and I am sure that our members will be grateful to Alex for the plugin when it works so they can tell where is what and when lol, as will I.

    I have bookmarked this page in the hopes of a reply, alternatively you may contact me via email or msn @ vanderwerf11 AT hotmail.com.

    I look forward to hearing from you.

    cheers
    Paul V

  9. Mark (podz)
    Support Maven
    Posted 9 years ago #

    What is line 62 ?

  10. Mark (podz)
    Support Maven
    Posted 9 years ago #

    // var slvIndicator = 'New';
    var slvIndicator = '<img src="http://www.tamba2.org.uk/T2/images/new_3.gif" alt="New" title="New since your last visit." />';

    Close to something like that ?

  11. PaulV
    Member
    Posted 9 years ago #

    That is some fast response!

    Not sure how to find the line numbers as I am editing through the cpannel.

    My best guess it is the following

    if (!empty($_GET["type"]) && $_GET["type"] == "js") {
    $wplastvisit_output = "javascript";
    }

    if (isset($wplastvisit_output)) { // will output stuff for the HTML source
    switch ($wplastvisit_output) {
    case "javascript":
    include("../../wp-blog-header.php");
    header("Content-type: text/javascript");
    ?>
    // var slvIndicator = 'New';
    var slvIndicator = '<img src="<?php bloginfo('siteurl'); ?>/ak-img/new.gif" alt="New" title="New since your last visit." />';

  12. Mark (podz)
    Support Maven
    Posted 9 years ago #

    '<img src="<?php bloginfo('siteurl'); ?>/ak-img/new.gif" alt="New" title="New since y

    that bit.......make it like this:

    <img src="http://somethin-tropical.epaulv.com/ak-img/new.gif"` and the rest .. that bloginfo stuff could be causing the error

  13. PaulV
    Member
    Posted 9 years ago #

    Well in there somewhere - it is calling for the ../../wp-blog-header.php where it seems to get lost in the loop. The header.php is in the main directory

  14. PaulV
    Member
    Posted 9 years ago #

    Ah so it is having trouble locating the subdomain?

  15. Mark (podz)
    Support Maven
    Posted 9 years ago #

    It could be .... the above might be wrong, but giving a full url will not stop it working and does cut out one potential error area.

  16. PaulV
    Member
    Posted 9 years ago #

    Changed that line in slv .

    At the top of last visit.php there is these instructions

    If your
    // site is accessible by multiple subdomain names, like "example.com"
    // and "www.example.com", then set $domain to ".example.com"

    // By default, we'll try to derive them from the site url defined
    // in the Base Settings options:
    $urlinfo = parse_url($siteurl);

    $path = $urlinfo['path'];
    $domain = $urlinfo['host'];

    The last line
    $domain = $urlinfo['host'];
    Should I change that to
    $domain = $urlinfo['somethin-tropical.epaulv.com'];

  17. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Yes - it's worth a go.
    Someone who knows more about paths could better advise, but one of the two lines there is definitely causing the problem.

  18. PaulV
    Member
    Posted 9 years ago #

    Done... still the same

    The line here has me concerned

    Warning: Cannot modify header information - headers already sent by (output started at /home/vanderwe/public_html/somethin-tropical/wp-content/plugins/wp-last-visit.php:274) in

    Seems to be trying to modify the head after it is already modified possible by the template?

  19. Mark (podz)
    Support Maven
    Posted 9 years ago #

    That line curently says 274 - I saw it change when I refreshed the page. Some whitespace has crept in at the end.
    Scroll down to the bottom of the file, put the cursor between the ? and the > then press and hold DELETE, release, press > and save.

  20. PaulV
    Member
    Posted 9 years ago #

    lol now it is 273

  21. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Hmmm......that error we can come back to.
    It's the way the file is looking two directories out (the ../../ ) that is breaking it first. That is probably a setting in one of the two lines you have menioned above.
    It may take a bit of trial and error, so keep a record of what you have tried and where.
    So....to kick of, what values have you tried ?

  22. PaulV
    Member
    Posted 9 years ago #

    ok i have removed any whitespace...

    As for values - is that regarding the ../../wp-blog.... part?

  23. PaulV
    Member
    Posted 9 years ago #

    With this
    include("../wp-blog-header.php");
    we get this
    Warning: main(../wp-blog-header.php): failed to open stream: No such file or directory in.......

  24. PaulV
    Member
    Posted 9 years ago #

    With this
    include("/wp-blog-header.php");
    we get this

    Warning: main(): open_basedir restriction in effect. File(/wp-blog-header.php) is not within the allowed path(s): (/home/vanderwe/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/vanderwe/public_html/somethin-tropical/wp-content/plugins/wp-last-visit.php on line 53

    Warning: main(/wp-blog-header.php): failed to open stream: Operation not permitted in /home/vanderwe/public_html/somethin-tropical/wp-content/plugins/wp-last-visit.php on line 53

    Warning: main(): open_basedir restriction in effect. File(/wp-blog-header.php) is not within the allowed path(s): (/home/vanderwe/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/vanderwe/public_html/somethin-tropical/wp-content/plugins/wp-last-visit.php on line 53

    Warning: main(/wp-blog-header.php): failed to open stream: Operation not permitted in /home/vanderwe/public_html/somethin-tropical/wp-content/plugins/wp-last-visit.php on line 53

    Warning: main(): Failed opening '/wp-blog-header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/vanderwe/public_html/somethin-tropical/wp-content/plugins/wp-last-visit.php on line 53

  25. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Do you use IRC ? It will be quicker to get help there clever guys in there you know)..

    "The last line
    $domain = $urlinfo['host'];
    Should I change that to
    $domain = $urlinfo['somethin-tropical.epaulv.com'];"
    Is that where you changed things ?

  26. PaulV
    Member
    Posted 9 years ago #

    With this
    include("somethin-tropical.epaulv.com/wp-blog-header.php");
    we get this
    pretty much the same thing

  27. PaulV
    Member
    Posted 9 years ago #

    No I removed mIRC some time ago

  28. PaulV
    Member
    Posted 9 years ago #

    I changed the
    $domain = $urlinfo['somethin-tropical.epaulv.com'];"
    and it is still the same.

    The changes posted were
    if (isset($wplastvisit_output)) { // will output stuff for the HTML source
    switch ($wplastvisit_output) {
    case "javascript":
    include("somethin-tropical.epaulv.com/wp-blog-header.php");

    This last line that origonally said ../../wp-blog-header.php

  29. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Try a full url ?

    include("http://somethin-tropical.epaulv.com/wp-blog-header.php");

  30. PaulV
    Member
    Posted 9 years ago #

    ok that fixed the first one.

    I returned the
    $domain = $urlinfo['host'];
    and changed the ../../wp-blog.... to
    include("http://somethin-tropical.epaulv.com/wp-blog-header.php");

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.