Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 08-05-2002, 08:45 PM
Mithan Mithan is offline
 
Join Date: Apr 2002
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I put

$pmlink="http://www.yoururl.com/forum/private.php?s=".$session[sessionhash];

near the top of the original code, and the echo part in as well, but all its returning is a

your PMs

Any idea?
Reply With Quote
  #12  
Old 08-05-2002, 08:53 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yep forget 1 extra char in the code.. use this:

echo "<href=".$pmlink.">your PMs</a>";
Reply With Quote
  #13  
Old 08-05-2002, 09:03 PM
Mithan Mithan is offline
 
Join Date: Apr 2002
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm, still not working. I had taken that littke > out before as well...

This is the full code.


Quote:
<?php
// enter your URL below. It's the URL relative to your host:
chdir("/home/ac2hq/www/forum/");

require('./global.php');

if ($bbuserinfo[userid]>=1)

{
$ignoreusers="";
if (trim($bbuserinfo['ignorelist'])!="") {
$ignoreusers='AND fromuserid<>'.implode(' AND fromuserid<>',explode(' ', trim($bbuserinfo['ignorelist'])));
}
$allpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers");
$newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND folderid=0 $ignoreusers");
$unreadpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND messageread=0 AND folderid=0 $ignoreusers");
$pmlink="http://www.ac2hq.com/forum/private.php?s=".$session[sessionhash];
}

if ($bbuserinfo[userid]>=1)
{

echo "Welcome ".$bbuserinfo['username']. ". You have ".$unreadpm['messages']. " Private Message." . '<br>';
echo "<href=".$pmlink.">your PMs</a>";

?>

<?php
}
else
{
?>
<form action="http://www.ac2hq.com/forum/member.php" method="post">
<font size="2">Please Login: </font>
<input type="hidden" name="s" value="$session[sessionhash]">
<input type="hidden" name="action" value="login">
<input type="text" class="bginput" name="username" size="2">
<input type="password" class="bginput" name="password" size="2">
<input type="submit" class="bginput" value="Login!">
</form>


<?php
}

chdir("/home/ac2hq/www/");
?>
Reply With Quote
  #14  
Old 08-05-2002, 09:10 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry it is:

echo "<a href=".$pmlink.">your PMs</a>";

I guess I need a sleep.. :knockedout:
Reply With Quote
  #15  
Old 08-05-2002, 09:16 PM
Mithan Mithan is offline
 
Join Date: Apr 2002
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bla
I should of seen that too....

Anyways thanks for the info. Do you mind if I clean this up and possible post it on the Hacks forum or something? I think this is something people would really like.

Full credit goes to you of course...
Reply With Quote
  #16  
Old 08-05-2002, 09:33 PM
Mithan Mithan is offline
 
Join Date: Apr 2002
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One last error im getting:

Warning: Cannot add header information - headers already sent by (output started at /home/www/ac2hq/index.php:86) in /home/www/ac2hq/forum/admin/functions.php on line 1582

Everything works fine, but I get this until I log into the forum, then it goes away...

Any clue?
Reply With Quote
  #17  
Old 08-05-2002, 09:43 PM
[D]Vincent's Avatar
[D]Vincent [D]Vincent is offline
 
Join Date: Jun 2002
Location: In my own little world?
Posts: 411
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Vincent]This doesn't really have to do with anything but I don't see the point in having the
PHP Code:
?>

<?php
in

PHP Code:
echo "Welcome ".$bbuserinfo['username']. ". You have ".$unreadpm['messages']. " Private Message." . '<br>';
echo "<href=".$pmlink.">your PMs</a>";

?>

<?php
}
Reply With Quote
  #18  
Old 08-05-2002, 10:33 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Do you mind if I clean this up and possible post it on the Hacks forum or something? I think this is something people would really like.
IMO it's not worth releasing especially considering the fact that there are better and more powerful main page alternatives already released. But I personally dont mind your releasing it if you want to. However I must say that I can NOT support (=answer questions) the release thread since I have already too many hacks of my own to support..

BTW. the code is really raw, you'd better clean it up and polish it if you are determined to release it (like the lines Vincent mentioned) and be ready to get plenty of "how can I add this into that hack" questions. :glasses:

Quote:
Warning: Cannot add header information - headers already sent by (output started at /home/www/ac2hq/index.php:86) in /home/www/ac2hq/forum/admin/functions.php on line 1582
What's line 86?
Reply With Quote
  #19  
Old 08-05-2002, 11:36 PM
Mithan Mithan is offline
 
Join Date: Apr 2002
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is what goes at line 86...


Quote:
<? //error checker thingy, don't want the whole thing to fail if one include can't cut it
// this one is the header code (title, css, etc, this will let us change the header in the future

if(!file_exists("include/$header.php") ) {
include("include/headercode.php");
} else {
include("include/$header.php");
}



?>
Unsure why that would interfere with anything... strange.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:01 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04426 seconds
  • Memory Usage 2,255KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete