Jump to content

Grandioso

Members
  • Posts

    98
  • Joined

  • Last visited

About Grandioso

  • Birthday 02/23/1990

Contact Methods

  • Website URL
    http://grandioso.org/

Profile Information

  • Gender
    Male
  • Location
    London

Grandioso's Achievements

Member

Member (2/5)

0

Reputation

  1. I was Googling for a couple of hours and the best solution I could come up with was to either use Drupal, or WP and build the site around them. E-commerce solutions, such as Magento only make sense when they handle the stocks, am I right ? This client already has a stock control in place and they also want to use shopatron, which I understand works as a shopping cart / order manager (?).
  2. We're currently looking to create a new website for a client who's a major retailer/reseller. They basically want 3 websites: - a retail site, selling directly to customers - a wholesale site, selling to other businesses - a consumer blog They already have a stock control and order management system in place. We're looking for the best solution we can come up with and I thought you guys could give me some ideas. My idea was, since they already have stock control and order management systems, to use a massive Wordpress multisite for all 3 websites, make a plug-in to handle the communication between the site and the SCS. We would also like to implement some features like 'popular items', 'recently viewed', 'sales reports; etc, which WP is not really good for. Any ideas ?
  3. I'm building my first ever page tab app for a facebook fan page. It's mostly static HTML with a gallery of user submitted images. The users will be able to vote for the images and the picture with the most votes wins. SImple enough, but I'm struggling here. I'm currently facing 2 problems - the first one is related to authentication inside the app and the other to app flow. 1. authentication In order to know who uploaded the picture, I need to get some unique user info + name. I found out that this is impossible without user authentication, so I'm trying to get the user to authenticate and let me use their ID/name. I created a login link using the getLoginUrl method of the php SDK. This login link works fine when used outside the context of facebook, but doesn't do anything when clicked inside the page tab. How else do I get the desired user data ? 2. app flow I'm trying to split the app into 3 main modules for now - main page, pre-like and upload form. Which one is displayed would be determined by a post variable. My index page looks like this: <?php include( 'head.php' ); if ( $is_liked ) { switch( $_GET['c'] ) { case 'upload' : include( 'pages/upload-form.php' ); break; default : include( 'pages/main.php' ); break; } } else { include( 'pages/pre-like.php' ); } include( 'foot.php' ); ?> The head file initializes the FB Object and creates a variable to say if the user like the page or not. $signed_requrest = $fb->getSignedRequest(); $is_liked = $signed_requrest['page']['liked']; This works fine, but when I'm on some other page (with a URL parameter), then the FB object will not be created correctly, therefore I'm not able to get the 'liked' state of the current user. Does anyone have any idea what's wrong with this ? I hope someone will be able to help me, as the documentation is not too clear about these things...
  4. I'm working on a website that was designed to be scrolled horizontally instead of vertically (not my idea) and I would like the users to be able to scroll with the mouse wheel. So instead of scrolling vertically when scrolling up and down it would go left and right. Is that possible at all ? I've been googling for some time now and haven't come up with a solution.
  5. I'm working on user registration/account management. I want to validate the old user password with AJAX, before the new password is being sent to the php script. So I want to wait for the AJAX to tell me whether the PW is correct or not and then either return false (stop posting the form), or go on. The problem is, the form is always posted. I don't know where to put the 'return false'. I've tried loads of different options, but it still won't work. If anyone could just take a look, it'd be much appreciated. This is how the button.click method looks like: { var current_pwd = $( '#current_password' ).attr( 'value' ); var pw_correct = false; $.ajax({ url: ajax_vars.ajax_url, type: 'POST', async: false, data: 'action=check_pw&pw='+current_pwd, success: function( data ) { pw_correct = data } }); if (!pw_correct) { alert('wrong pw'); return false; } } I tried to put it in 'complete' and 'success' callbacks, tried with async = true and false, but it still doesn't seem to work.
  6. This is a wordpress website, but I'm not sure if it's a WP error or not (I think not), so I'm posting here. Basically, I am listing a couple of entries into a list element for a JS slideshow. There's a max_count variable set, which is used to break pages (close current and open new <li>) when post_counter reaches the same value. The problem is, when the max_count is bigger than the total amount of elements, the loop does not output anything. It just doesn't make any sense to me and drives me crazy. If anyone could solve this mystery, it'd be much appreciated. Here's the code. <div id='home-slider-navig-left'> <img alt='arrow_left' src='<?php echo get_template_directory_uri() ?>/design/img/navig_arrow_left.png' id='navig_arrow_left' /> </div> <ul id='clients_home_ul' style="margin-top:20px;"> <?php global $a_query_args; global $b_show_client_link; $o_clients_query = new WP_Query( $a_query_args ); $i_post_counter = 0; $i_max_count = 6; //get_option( 'home_clients_postcount', 6 ); $i_page_counter = 1; $b_new_page = true; while ( $o_clients_query->have_posts() ) : $o_clients_query->the_post(); // if new page, open new li element if ( $b_new_page ) { $b_new_page = false; echo "<li class='clients_home_li page_{$i_page_counter}'>"; } $i_post_counter++; // break content at 'show more' global $more; $more = 0; // BUILD CLIENT HEADING $s_permalink = get_permalink(get_the_id()); $s_title = get_the_title(); $s_client_heading = "<h3>"; if ( $b_show_client_link ) $s_client_heading .= "<a href='{$s_permalink}' title='{$s_title}'>{$s_title}</a>"; else $s_client_heading .= $s_title; $s_client_heading .= "</h3>"; ?> <div class='clients_home_entry'> <div class='clients_home_entry_container'> <div class='clients_home_entry_image'> <?php the_post_thumbnail( 'clients_thumb' ); ?> </div> <div class='clients_home_entry_content'> <div class='relative'> <?php echo $s_client_heading ?> <?php the_content( '' ); ?> </div> </div> </div> </div> <!-- eof clients_home_entry --> <?php // CLOSE LIST ITEM IF MAX COUNT IS REACHED if ( (($i_post_counter % $i_max_count) == 0) ) { $i_page_counter++; echo "</li>"; $b_new_page = true; } endwhile; //close last list item echo "</li>"; ?> </ul> <div id='home-slider-navig-right'> <img alt='arrow_right' src='<?php echo get_template_directory_uri() ?>/design/img/navig_arrow_right.png' id='navig_arrow_right' /> </div> <div class='space'></div>
  7. I'm building a showreel page in Wordpress with a custom plugin. The plugin outputs a linked image for all items in the showreel and puts a "hidden data" div inside the anchor with all the video sources needed. Then there's the video container, which contains an empty video tag and a couple of images (video controls). When an image is clicked, I get the hidden data and replace/add the source tags to the video before it is opened with fancybox. This works fine, however, after closing the popup and clicking on another video it breaks after a random amount of clicks. In firefox it's right from the first click, in Chrome it's more. The script still changes the source tags, but the video is still the same. It's probably cached in the browser. Does anyone know how do I make it reload the video every time it opens in fancybox ? (I tried loading it through AJAX, but I couldn't get it to hook to a Wordpress function) The page can be viewed here http://londoncreativ...ls/tv-showreel/.
  8. I'm trying to put up a video on a website in both HTML5 and flash format. I copied at least 3 different code snippets, which were supposed to work on all browsers, but the video does not play in a single browser, lol. Chrome, Opera, FF, and IE9 seem to recognize the video tag, but can't play the video for some reason. I only see the initial image, if anything from the video and it shows the length correctly (yes, the src is correct). IE8 does not show the flash video at all. Here's the latest code I use now <video controls="" width="515" height="230">[/font][/color] <source src="...intro.mp4" type="video/mp4"> <source src="...intro.ogg" type="video/ogg"> <object width="515" height="230"> <param name="movie" value="...intro.flv"> <embed src="...intro.flv" width="515" height="230"> </embed> </object> </video> Is there some special type of encoding, or whatever that the browser doesn't support ? I don't understand this... Unfortunately I can't post a link to the website as it's our company's site and is under construction. ---edit Allright, I found out that it's not the video, but the controls that don't work. If I put in the autoplay att, it works fine. But it's a bit non-user friendly. I don't want the video to play automatically. Is there any way around this ?
  9. Thank you for the reply. After doing some research on SVN vs git and after reading your post I decided to go with git. I'm going to wrap my head around the pro git book ASAP.
  10. Hi. I am completely new to the whole version control thing and I'm not sure if I get it right, so I would really appreciate if someone helped me with this. What I would like to achieve is: - have my entire code on a remote (ideally my own) server - anyone with the password should be able to connect to it and do all of the VC stuff (check out/in, merge, brach, all of it) - be able to view the source code somehow, ideally through a web interface, or a desktop app GUI - an app, that would check my working directory (on the local machine) and handle all the operations for me, so all I need to do is fire up the app, click "update code", which would download the current version of the code, do my thing on my local server and then click "sync" (or maybe the same button) that would do all the merging and stuff I've been reading the SVN book yesterday, but I'm not sure if SVN is the right one for me. Which one would you recommend and how do I get it to work ASAP ?
  11. Fixed, thank you. But I still have no idea why the_author tag doesn't work. It's a mystery.
  12. Is there a reason why the_author should return an empty string on the first page when the user is not logged in, but return the author name just as it should when more posts are loaded through AJAX ? The loop is the same in both cases. Please help me resolve this issue as I'm clueless and I need it fixed ASAP to launch my site. Here's the whole index.php: <?php get_header(); get_sidebar(); ?> <!-- MAIN DIV --> <div id='content_and_floater'> <?php get_template_part('social_floater'); ?> <div id='content'> <?php get_template_part('loop'); ?> </div> </div> <?php get_template_part('loader'); ?> <!-- MAIN DIV --> <?php get_footer(); ?> And here's how the infinitePaginator calls the loop in functions.php (the function is called when scrolled down to the bottom or the loader link is clicked): function wp_infinitepaginate(){ $loopFile = $_POST['loop_file']; $paged = $_POST['page_no']; $posts_per_page = get_option('posts_per_page'); # Load the posts query_posts(array('paged' => $paged )); get_template_part( $loopFile ); exit; } You can see the behaviour at test.nowillnoskill.net. In single posts it's not working either. My guess is that query_posts(array('paged' => $paged )); changed something in the query, but I don't know what is it. I tried to insert setup_postdata($post); just after the_post() in loop.php as I found that worked for someone, but it doesn't for me. Here is my loop.php: <?php while ( have_posts() ) : the_post() ?> <!-- POST1 --> <article class='post'> <header class='post_header'> <?php global $current_user; $current_user = wp_get_current_user(); if (!empty($current_user)) { $pid = get_the_id(); $uid = $current_user->ID; $title = (is_favorite($pid, $uid)) ? 'Remove from favorites' : 'Add to favorites'; $trans = (is_favorite($pid, $uid)) ? '' : ' transparent'; ?> <div> <h2> <a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a> </h2> <?php if (is_user_logged_in()) { ?> <a title='<?php echo $title ?>' class='post_favorite' href='#' alt='fpid=<?php echo $pid ?>uid=<?php echo $uid ?>'> <span class='symbol<?php echo $trans ?>'>R</span> </a> <?php } ?> </div> <div class='post_header_div'> <strong class='post_category'> <?php echo get_the_category_list(', '); ?> </strong> <strong class='post_author'> <span class='symbol'>U</span> <?php the_author(); ?> </strong> </div> <div> <span class='post_author'> <?php edit_post_link('[edit]'); ?> </span> </div> <?php } ?> </header> <figure class='post_image'> <!--<img src='design/img/flashkick.png' alt='logo' />--> <?php the_post_thumbnail(); ?> </figure> <div class='post_perex'> <?php the_content('Read more'); ?> </div> <div class='space'></div> <footer class='post_footer'> <div class='post_footer_top'> <div class='post_tags'> <?php the_tags('', '', ''); ?> </div> <div class='post_time'> <time datetime="<?php the_time('Y-m-d'); ?>" pubdate> <span class='symbol'>P </span> <?php relative_post_the_date(); ?> </time> </div> </div> </footer> <div class='space'></div> </article> <?php endwhile; ?>
  13. OK, I could get the post IDs to display, but is there a way to display posts without having to create yet another loop ? I already have the same code in my index.php and loop.php. Loop.php is used for the infinite scrolling. Can I somehow call the loop.php file from a page and tell it to load just the user's favorite posts ?
  14. I want my users to be able to mark posts as favorite. I tried the wp-favorite-posts plugin, but it doesn't work. I mark posts as favorites and after refreshing the page it's all gone. Furthermore, if I put {{wp-favorite-posts}} to a page, it just shows the text. So I want to create my own solution, but don't really know how. I have never edited the WP database, but I have plenty of PHP mySQL experience. Can anyone please point me in the right direction ? What I would do is make a table called 'fav_posts' to connect user ID's with post ID, so it would have 2 rows. I suppose I could figure out adding posts. There would be a link with the current user ID and post ID somewhere in it. The link would trigger an ajax event which would create the new DB record or delete it if 'unfavorite' was clicked. Now the harder part would be getting the posts, somehow combining the new table with the WP query. I could create an empty page, and in page.php and add a condition to check if the current page is the favs page. But how do I output only the fav posts ?
×
×
  • 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.