Jump to content

BleedingEdge

Members
  • Content count

    109
  • Joined

  • Last visited

About BleedingEdge

  • Rank
    Advanced Member

Users Experience

  • Experience
    Intermediate
  • Area of Expertise
    I'm Learning

Contact Methods

  • Website URL
    http://

Profile Information

  • Gender
    Male
  • Location
    London, UK and Uzes, France
  • Interests
    Musicals (I'm a conductor of musicals), music, symphonic rock/metal, flying, parachuting, web design, theatre technology in general (LX, sound, stage design), film CGI and visual FX work (especially crowd simulation).
  1. Naff 70s Painting?

    Hi guys, I'm trying to find the name or artist of a painting which was apparently very popular in the UK in the 70s (I'm a child of the 80s myself ). It is of blue horses running through water, and is apparently quite naff, although incredibly popular at the time (one of those ones that "everybody" had on their wall...). Any help much appreciated! Thanks, Martin
  2. Hi guys, I'm getting really confused with implementing the facebook like button and the opengraph meta tags on my site, and would really appreciate some guidance. Sorry for the long post, I have bolded the specific questions in it. The way my site is set up (only taking FB into account - the other social plugins are all fine) is that in the sidebar has a like button for the whole site, but there is also a like button for each post (below each teaser on the home and archive (cat/tag/author/etc.) pages. So! I have just below the closing </body> tag: <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=my_app_id_is_here&xfbml=1"></script> And then in the sidebar: <fb:like href="http://www.mywebsite.com" send="true" layout="button_count" width="170" show_faces="true" font=""></fb:like> All fine. In the template for each post teaser I have: <fb:like href="<?php echo $share_url; ?>" send="false" layout="box_count" width="70" show_faces="true" font=""></fb:like> Again, all fine ($share_url is a custom variable with the permalink in - all good and working). So... Good so far. Yesterday I came across the open graph settings for facebook. One of the things that is giving me concern is the quote from the facebook developers pages: I have potentially up to 6 'like' buttons on a page (1 for the site, and 5 for the posts - I have 5 per posts per page). Will they ALL take on the og:url value, whatever the href="" setting of the like button?? That seems rather strange if true... Also, implementing open graph. Why would I want to set up a FB 'app'? What is the benefit of that rather than just using my fb admin ID? I'm slightly confused as to how it all links-in (no pun intended!). I have: - My own personal FB page - A 'page' for my company - and now, it seems, my website will be acting as a 'page' as well. Is this correct?! Finally, I did implement open graph, then went to 'like' my website, and it was as if I was only liking a normal link (no site logo used which I had in the og:image tag, and it didn't show up on my list of interests). Does it take time to propegate through the system? Many thanks for any help, and sorry for the rambling email! All best, Martin
  3. H1 and subheading image replacement

    Not at the moment (still putting them together), but I would say that they headings vary from about 300x350px to 700x250px etc, some left aligned, some right, some more random...
  4. H1 and subheading image replacement

    Hi mteam, Thanks. I missed your post as I was typing mine! Yes, I would have done exactly that or display:none on a span inside h1, but the heading size varies per page (and there are 20 or so pages), and the p would have to be the same, as well as the containing div background image. So that's 3 elements per page needing both CSS a) dimensioning (width and height), and positioning (every heading, deck, and background is positioned differently per page), which is 60 over the whole site. Which amounts to a lot of CSS code... M
  5. H1 and subheading image replacement

    Sure. I'm basing the design on the Vanilla Joomla template by YooTheme (I know, I know... In an ideal world I would have got my head around EE and designed my own site, but a) I'm a (busy) musician above all and I just need a site up and running. A redesign can come at a later stage by a pro who does this for a living when I actually have some disposable income!). Usual caveats from an amateur apply - the screenshots are low quality (20% quality jpegs) for file size. Everything (especially the site logo!) is only roughed out at the moment etc. etc. (basically, please don't mock my design just yet because it's only just started ). In the second shot, I have just got the 3 elements - heading 1 ("Hello! My name is Martin"), the background image (the cartoon) and the 'deck' paragraph ("Placeholder text etc..."). Because of font embedding licensing restrictions, as well as design, the two text elements have to be rendered as images. Basically, do I split the elements into 3 and position them separately using CSS (which, given that the theme - bg, h1, and deck - are different on each page will be a lot of CSS code), or just have a single 930x380px image as the background image of the div with the actual <h1> and <p> tags in the div set to display:none (which can be a single stylesheet entry which covers all pages)? Thanks! M
  6. Hi guys, I have set up a (relatively - for me!) complicated header for my site, which involves a background image, a heading (h1) and a 'deck' (to use newspaper parlance) - a paragraph of introductory text. Using the following code: <div id="top-heading"> <h1>Heading 1 Here</p> <p>Deck text goes here.</p> </div> The "top-heading" div is a fixed width and height (930x380px). I have thought about 2 ways to achieve what I want to. The easier I present second, but it somehow feels like a cheat - I'm just not sure why! First Method Using CSS, style both h1 and p as a block with the specific width and height of the heading image and deck text image, and assign the div, h1, and p a background image. Position them with CSS. Then within <h1> and <p> put the text in a <span> and style the .top-heading h1 span and .top-heading p span to display:none; <div id="top-heading"> <h1><span>Heading 1 Here</span></p> <p><span>Deck text goes here.</span></p> </div> Second (and easier) Method Simply create an image 930x380px with the heading, bg image, and deck text, and assign it as a background to the div. Then set .top-heading h1 and .top-heading p to display:none; Using the second method, I don't need to set the height and width of each particular element, and I also don't have to position each element separately. The second way is far easier (and less code-heavy), but it still feels like a cheat... The result is identical - visually with CSS, and also with no stylesheet applied, when both h1 and p are shown as text. (incidentally, experimentation shows that the overall file size is smaller with the second method too...) Thoughts on best practice appreciated! Thanks, Martin
  7. Hi guys, I am attempting to set up a development LAMP server in VMWare (up to now I've been using WAMP on my development machine, and there have been some inconsistencies when transferring to my hosting provider's Linux servers). I am a TOTAL Linux newbie. The command line scares me... So, I have downloaded CentOS (for no reason other than it is the server my hosting provider - Fasthosts - uses). My development machine has NO internet connection, so I can't download updates directly onto the machine from repositories (a pain, but having no 'net on it is non-negotiable - it's dual booted with my music production workstation, and I never let that go near an internet connection...). What I would really like to do, for my own peace of mind (and learning!), is to download the distributions of Apache, PHP, MySQL, Perl, an FTP server etc. manually and install them, rather than relying on packages like XAMPP which, whilst great, give me NO idea of how to actually set up servers... But, I would like to do this in GNOME Terminal (or KDE) and emacs, not from the command line. I'm still a newbie, remember? And I like GUIs So, first and foremost, what versions do I use? Am I right in thinking that CentOS, being a RHEL downstream distro, relies on RPMs? So do I download the RPM versions of the server software? Many thanks, Martin
  8. Can someone please explain "$this->" to me in layman's terms...

    Thank you very much! Think I'm beginning to get the hang of it now.
  9. Hi guys, I'm newish to all this and have been messing around with CodeIgniter (and, to a lesser extent, ExpressionEngine). I have a class extending a class: <?php class Homepage extends MY_Controller ?> I set variables in Homepage: <?php protected $page_id = 'home'; // Page reference ID protected $page_title = 'Home'; // Page title for <title> tag protected $parent_id = ''; // Parent page ID if child (null if page is parent) protected $parent_title = ''; // Parent page title if child (null if page is parent) protected $h1_text = "Heading 1 Here"; // Text used for <h1> with CSS turned off protected $page_color = '#0d507a'; // Page colour scheme protected $bg_position = '560px 0px'; // Background image CSS position protected $h1_margins = '30px 0px 40px 0px'; // <h1> image CSS position protected $meta_description = 'Description'; // Meta description protected $meta_keywords = 'Keywords'; // Meta keywords protected $meta_robots = 'INDEX,FOLLOW'; // Meta robots ?> and assign them to an array $pagevars in MY_Controller (the parent controller). $pagevars is then one of the params in a view load from Homepage (still with me?! Not too sure I am myself... ). MY_Controller <?php $this->pagevars['site_name'] = $this->site_name; $this->pagevars['base'] = $this->base; $this->pagevars['idx_page'] = $this->idx_page; $this->pagevars['assets'] = $this->assets; $this->pagevars['page_id'] = $this->page_id; $this->pagevars['page_title'] = $this->page_title; $this->pagevars['parent_id'] = $this->parent_id; $this->pagevars['page_crumb_trail'] = $this->page_crumb_trail; $this->pagevars['h1_text'] = $this->h1_text; $this->pagevars['page_color'] = $this->page_color; $this->pagevars['bg_position'] = $this->bg_position; $this->pagevars['h1_css_size'] = $this->h1_css_size; $this->pagevars['h1_margins'] = $this->h1_margins; $this->pagevars['meta_description'] = $this->meta_description; $this->pagevars['meta_keywords'] = $this->meta_keywords; $this->pagevars['meta_robots'] = $this->meta_robots; ?> Homepage <?php $this->load->view('viewname', $this->pagevars); ?> And it works! Awesome. BUT, I habe no idea what the $this-> is all about as part of the variables. It seems necessary for one 'file' to call 'another' (or for inter-class communication), but I can't find a decent explanation as to why. Any help appreciated! Many thanks, Martin
  10. CodeIgniter - blocking direct access to files...

    Thanks Jock. @asek - yeah, I looked at all the CI files and have started putting <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?> in the header of all my files. As of CodeIgniter 2.0, the application directory is outside the system directory by default as well, so I guess it's best practice to put both outside htdocs. M
  11. Hi guys, In codeigniter, is it necessary to block access to files (views, controllers etc.) you create using define('VariableHere', TRUE); and if(!defined('VariableHere'){die('Direct access not permitted');} (or .htaccess or similar etc etc.), or does CI automatically handle this? Cheers! Martin
  12. Thanks. I may just go with a relative path. No joy with setting the parsing to input either. Thanks for the reading material!
  13. I did think about that, but I thought it might overcomplicate things - each template is a different 'design' anyway, so separate template files have to exist. Keeping the variables in the header of the template file keeps everything is in one place. There are only 8 different templates anyway. I'm using weblogs for news, downloads, and resources (a links directory).
  14. Hi guys, I have found some strange behaviour with the ExpressionEngine {site_url} variable when used in PHP. Using custom variables in PHP woks fine, but {site_url} doesn't want to play nice. This doesn't work: <?php // Get the width and height of the h1 image for image replacement $h1_size = getimagesize("{site_url}img/pages/{embed:page_id}-h1.png"); ?> Whereas this, oddly, does! {assign_variable:website_root="http://localhost/"} <?php // Get the width and height of the h1 image for image replacement $h1_size = getimagesize("{website_root}img/pages/{embed:page_id}-h1.png"); ?> Also, assigning website_root to equal {site_url} also doesn't work, which makes me think that there is something strange being output from {site_url}. {site_url} works perfectly everywhere else in the site! Any help appreciated. Many thanks, Martin
  15. Thanks! I didn't want to use global variables because I wanted to use variables to trigger certain behaviours depending on the template. At the top of each template file I have: {!-- Website root URL --} {assign_variable:website_root="http://localhost/site/"} {!-- Internal reference ID of page --} {assign_variable:page_id="home"} {!-- Page title --} {assign_variable:page_title="Home"} {!-- Page heading (text used for <h1> tag) --} {assign_variable:page_heading="This is a Heading"} {!-- Page colour (used for background and links etc.) --} {assign_variable:page_color="#0d507a"} {!-- Page META description --} {assign_variable:meta_description="META Description Goes Here"} {!-- Page META keywords --} {assign_variable:meta_keywords="META Keywords Go Here"} {!-- Background image position --} {assign_variable:bg_position_left="560"} {assign_variable:bg_position_top="0"} {!-- Heading 1 image margins --} {assign_variable:h1_margin_top="30"} {assign_variable:h1_margin_right="0"} {assign_variable:h1_margin_bottom="40"} {assign_variable:h1_margin_left="0"} I can't put these in a global variables (with the possible exception of website_root - see other post for that!!) because they are different 'per template'. Cheers! Martin
×