Jump to content

oneofayykind

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Everything posted by oneofayykind

  1. So here is what I'm trying to do. I'm using Wordpress. I have added a Login and Register link to my header along with an avatar box next to it like you would see next to someones comment. What I would like to have happen is after someone logs in that default avatar box update to their own avatar (if they have one or show the default avatar if they don't) and then not show the login and register links anymore and instead show a link to their profile.
  2. Ok guys so I found a lightbox login for wordpress online here http://www.problogdesign.com/how-to/how-to-create-a-wordpress-login-form-overlay/ and I followed the instructions for setting it up which included creating a new login.php file and putting it in my themes folder, adding code to the header.php file, and adding the login link to the comments page. When you click login the lightbox pops up and loads with no problem in both IE and Chrome and you can enter the login credential and click login. If you enter them correctly it redirects back to the page you were on and if you didn't enter them correctly it goes to the wp-login.php page telling you to re-enter because they were wrong. It looks to me like its checking the un/pw properly but when you get redirected back to the comments section of the article page you were on it still looks like you arent logged in. For some reason it doesn't recognize that you are logged in so it won't allow you to post a comment. Besides the link to the actual tutorial here is the code I entered into my php pages: This was added to my header.php file: <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/lightbox/css/lightbox.css" type="text/css" /> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/lightbox/scripts/prototype.js"></script> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/lightbox/scripts/lightbox.js"></script> Here is my comments.php file (whole thing): <!-- Jump Link --> <a id="comments" href="comments"></a> <?php // Do not delete these lines if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) die ('Please do not load this page directly. Thanks!'); if ( post_password_required() ) { echo '<div class="wpn_nocomments">This post is password protected. Enter the password to view comments.</div>'; return; } ?> <?php if ( have_comments() ) : ?> <!-- Comment List // --> <span class="heading"><a href="#respond">Leave a Comment »</a><?php comments_number('0 Comments', '1 Comment', '% Comments' ); ?></span> <div class="comments"> <ul> <?php wp_list_comments('callback=wpn_huex_comment'); ?> </ul> <div class="navigation" style="padding:10px;"> <div class="clear"></div> <div class="alignleft"> <?php previous_comments_link() ?> </div> <div class="alignright"> <?php next_comments_link() ?> </div> <div class="clear"></div> </div> </div> <!-- // Comment List --> <?php else : ?> <div class="comments"> <?php if ('open' == $post->comment_status) : ?> <!-- Comments are open but no comments // --> <span class="heading">No comments currently exist for this post.</span> <p>Why don't you make one?</P> <?php else : ?> <!-- Comments are closed --> <span class="heading">Comments are closed.</span> <?php endif; ?> </div> <?php endif; ?> <?php if ('open' == $post->comment_status) : ?> <!-- Reply Form // --> <div class="comments"> <div id="respond"> <span class="heading"><a href="http://www.gravatar.com/" target="_blank"><img src="<?php bloginfo('stylesheet_directory'); ?>/img/icon_gravatar.png" alt="" /> Get a Gravatar</a>Leave a Reply</span> <div class="cancel-comment-reply"><img src="<?php bloginfo('stylesheet_directory'); ?>/img/icons/cross.png" /> <?php cancel_comment_reply_link(); ?></div> <?php if ( get_option('comment_registration') && !$user_ID ) : ?> <!-- User needs to login // --> <div class="wpn_logged_in">You must be <a href="<?php echo get_option('siteurl'); ?>/wp-content/themes/<?php echo get_option('template'); ?>/login.php?redirect=<?php the_permalink(); ?>" class="lbOn" title="Log in"><strong>Logged In</strong></a> to post a comment.</div> <!-- // User needs to login --> <?php else : ?> <div class="cform"> <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> <?php if ( $user_ID ) : ?> <!-- User logged in // --> <div class="wpn_logged_in"><span class="wpn_logged_text">Logged in as</span> <img alt="user" src="<?php bloginfo('stylesheet_directory'); ?>/img/icons/tick.png" /> <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a> <img alt="logout" src="<?php bloginfo('stylesheet_directory'); ?>/img/icons/cross.png" /> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Logout</a></div> <!-- // User logged in --> <?php else : ?> <!-- User not logged in // --> <p class="input"><strong>Name:<input name="author" type="text" value="<?php echo $comment_author ? $comment_author : ''; ?>" /></strong> <span class="required">« Required</span></p> <p class="input"><strong>Email Address:<input name="email" type="text" value="<?php echo $comment_author_email ? $comment_author_email : ''; ?>" /></strong> <span class="required">« Required</span></p> <p class="input"><strong>Website URL:<input name="url" type="text" value="<?php echo $comment_author_url ? $comment_author_url : ''; ?>" /></strong> <span class="optional">« Optional</span></p> <!-- // User not logged in --> <?php endif; ?> <?php do_action('comment_form', $post->ID); ?> <p class="input textarea"><strong><textarea name="comment" id="comment" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;">Type your message here...</textarea></strong></p> <p> <input class="sprite" type="submit" value="Submit" /> <strong>You can use these tags:</strong><br /> <?php echo allowed_tags(); ?> </p> <?php comment_id_fields(); ?> <div class="clear"></div> </form> </div> <?php endif; ?> </div> </div> <div class="wpn_box-bottom"></div> <!-- // Reply Form --> <?php endif; ?> Here is the login.php file that I added to my theme folder: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <? $blogurl = "http://www.droidedup.com/testing/droidedup"; $postlink = $_GET['redirect']; ?> </head> <body> <div id="login"> <form name="loginform" id="loginform" action="<?=$blogurl ?>/wp-login.php" method="post"> <p> <label>Username<br /> <input type="text" name="log" id="user_login" class="input" value="" size="20" tabindex="10" /></label> </p> <p> <label>Password<br /> <input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label> </p> <p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /> Remember Me</label></p> <p class="submit"> <input type="submit" name="wp-submit" id="wp-submit" value="Log In" tabindex="100" /> <input type="hidden" name="redirect_to" value="<?=$postlink ?>#respond" /> <input type="hidden" name="testcookie" value="1" /> </p> </form> <p id="nav"> <a href="<?=$blogurl ?>/wp-login.php?action=lostpassword" title="Password Lost and Found">Lost your password?</a> </p> </div> <p id="backtoblog"><a href="#" class="lbAction" rel="deactivate">Close</a></p> <script type="text/javascript"> try{document.getElementById('user_login').focus();}catch(e){} </script> <link rel="stylesheet" href="<?=$blogurl?>/wp-admin/css/login.css" type="text/css" /> </body> </html> I hope someone is able to point me the right direct with some understand as to why this isn't working the way it should? Or maybe just a solution without a reason why?
  3. I found the answer in the common.js file.
  4. Sorry if I'm posting in the wrong section of this forum. I am currently altering a theme in wordpress and I'm stuck at what I believe to be some php stuff. In my header.php file i have a div that reads: <?php $featured = new WP_Query("cat=".get_wpn_config('featured_category_id')."&showposts=5"); while($featured->have_posts()) : $featured->the_post();?> <li><a href="<?php the_permalink(); ?>"><img src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="" /><?php the_title(); ?></a></li> <?php endwhile; ?> What I'm trying to do is set the thumbnail image size to 50px by 50px. I change the css to that but it defaults back to a width of 34px. You can see exactly what I'm talking about at http://www.droidedup.com/testing/droidedup Here is what the output HTML looks like: <ul class="fthumbs"> <li style="width: 34px; display: list-item; " class=""><a href="http://droidedup.com/testing/droidedup/?p=25" class=""><img src="http://droidedup.com/testing/droidedup/wp-post-thumbnail/xwSOm.jpg" alt="">Testing 123…Testing Testing Testing</a></li> <li style="width: 34px; display: list-item; " class=""><a href="http://droidedup.com/testing/droidedup/?p=22" class=""><img src="http://droidedup.com/testing/droidedup/wp-post-thumbnail/Mm7dCd.jpg" alt="">This is a test article, this is only a test</a></li> <li style="width: 34px; display: list-item; " class=""><a href="http://droidedup.com/testing/droidedup/?p=19" class=""><img src="http://droidedup.com/testing/droidedup/wp-post-thumbnail/jBuPJU.jpg" alt="">The Fan Named HTC Wildfire Becomes Official, AKA The Mini Desire Heading To The U.K.</a></li> <li style="width: 34px; display: list-item; " class=""><a href="http://droidedup.com/testing/droidedup/?p=16" class=""><img src="http://droidedup.com/testing/droidedup/wp-post-thumbnail/jdvuzA.jpg" alt="">Sprint HTC Hero finally getting official 2.1 update</a></li> <li style="width: 254px; display: list-item; " class="active"><a href="http://droidedup.com/testing/droidedup/?p=13" class="activeSlide"><img src="http://droidedup.com/testing/droidedup/wp-post-thumbnail/hC6RVg.jpg" alt="">HTC EVO 4G Reviewed – Battery life the bottleneck</a></li> </ul> My CSS code is: .header .featured .fthumbs li {float:left;padding:1px;border:0px solid #fff;width:50px;overflow:hidden;height:50px;margin-right:10px;-moz-border-radius:0px;-webkit-border-radius:0px;} .header .featured .fthumbs li.active {width:254px;} .header .featured .fthumbs li img {vertical-align:middle;margin-right:5px;display:inline-block;width:50px;height:50px;} .header .featured .fthumbs li a {font-size:11px;font-weight:bold;display:block;} .header .featured .fthumbs li a:hover {text-decoration:none;} Again sorry if I am posting in the wrong forum. I am completely stumped and don't know much about php yet.
  5. I'm creating a nav bar that will show one thing if the user isn't logged in and another if the user is logged in. I have created it successfully but I don't believe its working like it should although it seems like it does...This code is from the phpbb 3.0 forum that I have been altering. The code is this <!-- IF not S_USER_LOGGED_IN and not S_IS_BOT --> <div class="navbar"> <div class="inner"><span class="corners-top"><span></span></span> <ul class="linklist navlinks"> <li class="forum-home"><a href="{U_INDEX}" title="{L_INDEX}">Forum Home</a></li> <li <fieldset class="icon-faq"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></fieldset></li> <li><form method="post" action="{S_LOGIN_ACTION}" class="headerspace"> <!-- IF S_REGISTER_ENABLED --><a href="{U_REGISTER}">{L_REGISTER_HOME}</a><!-- ENDIF --> <li><fieldset class="quick-login"> <label for="username">{L_USERNAME}:</label><input type="text" name="username" id="username" size="10" class="inputbox" title="{L_USERNAME}" /><!-- IF S_AUTOLOGIN_ENABLED --><label for="autologin">{L_LOG_ME_IN} <input type="checkbox" name="autologin" id="autologin" /></label></li> <!-- ENDIF --> <li><fieldset class="quick-login1"> <label for="password">{L_PASSWORD}:</label><input type="password" name="password" id="password" size="10" class="inputbox" title="{L_PASSWORD}" /></br> <input type="submit" name="login" value="{L_LOGIN}" class="button2" /> </fieldset></li> <!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH --> <li><div id="search-box" style="cursor: pointer;"> </fieldset> <form action="{U_SEARCH}" method="post" id="search"> <fieldset> <input name="keywords" id="keywords" type="text" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" /> <input class="button2" value="{L_SEARCH}" type="submit" /><br /> <a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_SEARCH_HIDDEN_FIELDS} <!-- ENDIF --> </fieldset> </form> <li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li> </ul> <!-- ELSE IF S_USER_LOGGED_IN and S_IS_BOT --> <div class="navbar"> <div class="inner"><span class="corners-top"><span></span></span> <ul class="linklist1 navlinks1"> <li class="forum-home"><a href="{U_INDEX}" title="{L_INDEX}">Forum Home</a></li> <!-- IF not S_IS_BOT and S_USER_LOGGED_IN --> <li class="icon-ucp"> <a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="u">{L_PROFILE}</a> </li> <li <fieldset class="icon-faq"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></fieldset></li> <li class="icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="l">{L_LOGIN_LOGOUT}</a></li> <!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH --> <li><div id="search-box" style="cursor: pointer;"> </fieldset> <form action="{U_SEARCH}" method="post" id="search"> <fieldset> <input name="keywords" id="keywords" type="text" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" /> <input class="button2" value="{L_SEARCH}" type="submit" /><br /> <a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_SEARCH_HIDDEN_FIELDS} <!-- ENDIF --> <!-- ENDIF --> <!-- ENDIF --> Could someone tell me if this is correct? It works properly cause if you logged in it shows the other nav but anything after the ELSE i can change and it doesn't matter it still shows the nav after log in. What I'm ultimately looking to accomplish is add another else so the first else looks to see if the user is logged in and is not a moderator and shows that nav and then and else that looks to see if the user is logged in and is a moderator and shows a different nav. I would appreciate any help and sorry if I posted in the wrong place.
  6. There has to be a solution besides flash...I dont like flash movies on my sites!
  7. So I could code the php into a flash swf and the load the movie onto the page?
  8. I have a php calendar on my site. I would like to customize the calendar and add a bg image behind it which I know how to do...but what I would like to do is rotate the calendar so it doesnt look so "flat". My site is http://www.theallentree.com and the bg image i'm talking about adding to the calendar is something like http://www.theallentree.com/images/calendarbg.jpg. That isnt the exact image but something to that affect and as you can see the bg image is not straight so I would like to be able to take the actually calendar itself and rotate it to look like it is part of that bg image. Anyone have any ideas on how I could go about doing this?
  9. Just curious if someone could point me in the right direction. Don't want someone to write the code for me just tell me what I should be using. I got the calendar from Easy PHP Calendar I just want to be able to take the events added to the mysql database and show this months events underneath the calendar.
  10. There is a calendar I integrated into my website and you can add events to it. What I would like to do is list the upcoming events underneath it. I would like to only list the upcoming events for the month. A sample of what I'm talking about can be listed at http://wpcal.firetree.net/ The events from my calendar are written to a mysql database. I would appreciated help on this if anyone has any ideas?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.