
Grandioso
Members-
Posts
98 -
Joined
-
Last visited
Everything posted by Grandioso
-
Best CMS for a big retail/wholesale site + blog
Grandioso replied to Grandioso's topic in Applications
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 (?). -
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 ?
-
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...
-
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.
-
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.
-
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>
-
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/.
-
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 ?
-
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.
-
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 ?
-
Fixed, thank you. But I still have no idea why the_author tag doesn't work. It's a mystery.
-
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; ?>
-
Wordpress - How to create a fav posts feature
Grandioso replied to Grandioso's topic in Applications
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 ? -
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 ?
-
I'm still working on my new Wordpress site. It's almost ready to launch, but I've run into a couple of problems which I just can't explain logically. Any help would be greatly appreciated. The website is at test.nowillnoskill.net Here they are: Recent posts stopped working I want to return the 2 newest posts when in single post mode, but exclude the current post. And I did it. The problem is, it just stopped working. It didn't change the code and it stopped on the server as well as on my localhost. Here's the code: <section id='recent_posts'> <header class='recent_header'> Recent posts </header> <?php $id = $post->ID; $recent_posts = wp_get_recent_posts("numberposts=2&exclude=$id"); foreach( $recent_posts as $recent ) { ?> <article class='single_recent'> <header> <a href="<?php echo get_permalink($recent["ID"]); ?>"><?php echo $recent["post_title"]; ?></a> </header> <p> <?php echo get_excerpt_by_id($recent["ID"]); ?> </p> </article> <?php } ?> </section> See this question on SO the_author() empty only on index.php when not logged in I have two different ways to load posts. One is in index.php and another one is in loop.php. The first one loads the first 4 posts, the latter loads more posts when scrolling down or clicking on the "load more" button. Both are inside the loop. The code is THE SAME, but index.php doesn't show anything when I call the_author, when a user is not logged in. When I'm logged in, I see the author name all the time and when logged out, I only see the name on newly loaded posts. See this question on SO have_comments() returns false [with comments_template()] I just copied the code for the comments template and the 3 functions from this tutorial and it doesn't work. I found a solution that says I should call the template with comments_template() instead of the general include method and that is how I do it. It still doesn't show a single comment, even though get_comments_number() returns 2 and I see the comments in the dashboard. See this question on SO
-
Signing in with FB/Twitter/Google (+ more help with my project)
Grandioso replied to Grandioso's topic in Applications
I solved the AJAX form, but I'm not sure how secure it is. It is submitted to index.php, and it can only be posted with AJAX. Does anyone have any idea what happens if someone has JS turned off and posts some code to the Wordpress index page ? I think it should be fine, isn't it ? BTW is there a way to add a new Wordpress variable that I can change in the backend UI ? I'd like to add things like e-mail address and auto-response text for the form, so I don't have to change the code every time I need to change it. -
Signing in with FB/Twitter/Google (+ more help with my project)
Grandioso replied to Grandioso's topic in Applications
It's inside the 'test' page, which loads through AJAX when it's called from the navig, so it's basically on the homepage. I just put one input there, it's not how it will look like, but if you go to http://test.nowillnoskill.net/ you can see how it works. So basically if I omit the 'action' att, the I'm submitting it to index.php, isn't that right ? What I'm asking is, what do I then ? I'm pretty sure I don't have to edit the index file and that there's a different way to do this in WP. -
Signing in with FB/Twitter/Google (+ more help with my project)
Grandioso replied to Grandioso's topic in Applications
Thanks for the input, mate. So are you saying I should edit the WordPress index.php then ? -
Signing in with FB/Twitter/Google (+ more help with my project)
Grandioso replied to Grandioso's topic in Applications
Yeah, that's what I'm asking. How do I do that ? I didn't mention that normally, with JS turned on, the pages display withing the index page, so the URL doesn't change - it just slides down. Check it out at test.nowillnoskill.net I did something similar with the "endless scroll" - I had to "add action" in functions.php. Is it something similar ? Btw why haven't I come across an in depth tutorial to wordpress with explanations of how it works ? I really want to learn it, but I don't know where. Can anyone point me in the right direction ? Maybe a good ebook on the topic ? -
Signing in with FB/Twitter/Google (+ more help with my project)
Grandioso replied to Grandioso's topic in Applications
I already got the sign in part down thanks to this awesome plugin: http://wordpress.org/extend/plugins/oa-social-login I've got most of my website now, but I've run into some issues. Currently I'm working on a contact form, which is pretty easy, but i want to do it right and integrate it nicely into Wordpress. I already tried a plugin called "Contact form 7", but it's not working for me. I'm guessing one of the plugins I use is messing with the shorttag, so I can't use them. The form will be inside a page, so I can just insert the form HTML into the page. What I'm not sure about is, where should I redirect the form (the action attribute). Is there some special way to do this in WP, or should I just do it as I would do it normally - make a new file within the theme directory and handle the form there ? I want to create an AJAX form, if it makes any difference. Please check out my other issues and let me know if have any suggestions.. have_comments() returns false [with comments_template()] wp_get_recent_posts stopped working -
My No Will No Skill blog/website [responsive/HTML5]
Grandioso replied to Grandioso's topic in Website Critique
Thanks for the tips guys. I changed the font, but cannot check it in all browsers ATM (I only have FF and Chrome and a shitty limited net connection). Let me know if it looks allrite. Also, please tell me what do you think about the copy in the "About" section. I tried to fill it with keywords and put it on the very top of the page hoping to get the best possible SE rankings. What else do you think I should do in terms of SEO ? I want to finish the design today so I can start building the WP theme tomorrow. -
My No Will No Skill blog/website [responsive/HTML5]
Grandioso replied to Grandioso's topic in Website Critique
I know, because it's HTML5, heh. It'll put in a script that allows styling for browsers that don't support HTML5 + some kind of message that they should upgrade their browser. -
My No Will No Skill blog/website [responsive/HTML5]
Grandioso replied to Grandioso's topic in Website Critique
Yeah, the font looks beautiful on my HTC Evo 3D default Android browser, but unfortunately it looks horrible in Opera desktop. Do you have any recommendations as to which (free or cheap) font would work with the design ? -
Hi guys. I created a blog like half a year ago called No Will No Skill. Now I want to transform it into a little different concept - there are going to be article/video and all kinds of recommendations to other webpages besides my own (and possibly others') blog posts. I want this website to be really awesome in terms of design, SEO and overall UX. So I created this responsive black&white design. On mobile devices there's only one row with the control bar hidden - the user can display it with a simple button click. On slightly bigger screens, the control bar is shown to the right with one column of content to the left. Then on wide screens, there are two columns of content, the right side is using inverted colors and the heading is aligned to the right. You can check all three cases just by resizing the browser window. Here's the design: http://test.no-will-no-skill.com/ The widths for triggering the designs will change a little bit, especially the third one will need to be set to higher value. This is just to be able to view all three on my laptop screen. I need a little help with two things: - the third case - wide screens. I'm not sure about it. I would like to make it so that the posts on the right are directly underneath each other, not depending on the height of the post on the left side. But I don't know if it's possible without putting them into different divs (which I don't want). I would like to do it with CSS :nth-child, like it is now. - the control bar - I want a different effect, but I don't know how to do it. It should look like it slides down from the menu bar and gradually pushes down the site content. Now it just appears and it doesn't look that smooth. And there's a little bug - when I hide and show the control bar in the mobile view and then resize the window, it doesn't show anymore. This could be a big issue when going to landscape mode. How do I fix it ?