Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dick Laurent

Members
  • Joined

  • Last visited

  1. Hello, I am working on a site for a show business agency that will contain a profile for each talent they have on their books. Each profile requires the option to display a video as an example of that talents recent work. There will also be a section on the home page displaying 4 videos of the agencies recent projects. Both of the sections will be content managed using the system I have developed in CakePHP. My current solution uses Jplayer which requires three file formats (m4v, ogv, webMv) of a video for it to be truly cross-browser. This will require the user to not only upload three versions of every video, but also, to convert the source video into the required formats. My question then is am I going down the wrong route here with this solution, is there a better more efficient way of implementing this. Eternally grateful for any helpful suggestions! Thanks for reading Gary
  2. Hi Everyone, This is my first go at integrating Sage Pay with a website and I have hit a wall. All is working fine until the PurchaseURL and Post string with all transaction details are sent to Sage (just the simulator at the mo). As far as I can see on looking at the generated transaction details string it is fine but I am getting the following when I debug the Sage response: [VPSProtocol] => 2.23 [status] => INVALID [statusDetail] => The data in the BillingFirstnames field you supplied is as invalid format. Here is a copy of the Transaction string: VPSProtocol=2.23&TxType=PAYMENT&Vendor=creativevein&VendorTxCode=creativevein-0000000016-20072012-154815&Amount=29.99&Currency=GBP&Description=Your+ESTA+VISA+application+from+creativevein&NotificationURL=https://www.visa-travel-usa.com/online-application/sage-notification&1:ESTA VISA:1:30:29.99:29.99:29.99&BillingFirstnames=Benjamin&BillingSurname=Mason&BillingAddress1=65 High Street&BillingCity=Manchester&BillingPostCode=M4 1FS&BillingCountry=GB&DeliveryFirstnames=Benjamin&DeliverySurname=Mason&DeliveryAddress1=65 High Street&DeliveryCity=Manchester&DeliveryPostCode=M4 1FS&DeliveryCountry=GB&CustomerEMail=gary%40creative-vein.co.uk&Basket=1%3AESTA+VISA%3A1%3A30%3A29.99%3A29.99%3A29.99&AllowGiftAid=0&ApplyAVSCV2=0&Apply3DSecure=0&Profile=NORMAL Anyone who can point me in the right direction with this would be greatly appreciated! I've looked around for a while now and am just stuck. Thanks!
  3. Oops, wait! That isn't quite right. Any other ideas?
  4. wow, that simple. I had tried that but with single quotes around the variable. Right under my nose! Thank's man...
  5. Hi, I'm writing a method that will set values for some of an objects variables. I need it to be dynamic in that one of the variables to be set will differ in name depending on which child class is instantiated to call the method. So the child class would look like this: class PhotoComment extends Comment { public $photo_id; public function __construct(){ $this->table_name="photo_comment"; $this->field_name="photo_id"; $this->db_fields=array('id', 'photo_id', 'date', 'author', 'content'); } } The '$this->field_name' sets the value of $field_name in the parent class to the name of the variable in the child class (in this case $photo_id). Then the method in the parent class should use the value of $field_name to set the value of the childs variable(again, $photo_id). Here is some of the parent class, hopefully this will indicate exactly what I'm trying to do: class Comment extends DatabaseObject { public $id; public $date; public $author; public $content; public $table_name; public $field_name; // Now has value of 'photo_id' public function make($id, $author="Anonymous", $content) { if(!empty($content)) { $this->$$field_name = $id; // I know this isn't right but this should equate to '$this->photo_id = $id' $this->date = strftime("%Y-%m-%d %H:%M:%S", time()); $this->author = $author; . . . Hope that explains what I want to do. Can anyone help?
  6. Well, it took a lot of rejigging but the simple idea of declaring the table_name variable in the super class and giving it a value whe instantiating the child worked. Always seems so obvious when you have hindsight! I'll get there, thanks for the help!
  7. That makes alot of sense, I'll give it a try. Thanks for the reply!
  8. Hi all, I have a number of classes that all have a large group of methods which are exactly the same in each class. The only difference between each classes methods is a variable used which is defined within the class. In the interests of decoupling I would like to move all the methods into one class. I am thinking that I should move the methods into a class and make all the other classes extend it thus still allowing them access to the methods. This would require that the methods are still passed the variable from the (now) child classes. Here is an example of what I'm trying to get at: require_once(LIB_PATH.DS.'database.php'); class databaseObject{ public static function count_all() { global $database; $sql = "SELECT COUNT(*) FROM ".self::$table_name; $result_set = $database->query($sql); $row = $database->fetch_array($result_set); return array_shift($row); } } class Article extends databaseObject{ protected static $table_name="articles"; } class Photo extends databaseObject{ protected static $table_name="images"; } Now that the self keyword in the method is no longer valid I have found out that changing it to static (late static binding) might work. But this doesn't work for all the methods. My question is, am I barking up the wrong tree with this idea of letting subclasses inherit the functions or is there a way to make it work? Is this good practice? I'm reasonablly new to oop and would really appreciate being nudged in the right direction with this one! Thank's for reading! Gary
  9. Cheers Josh, I guess I haven't spent as much time on the visual aspect of the site as I have the server-side scripting. I'll definitely spruce things up before I officially launch and advertize it. Still a work in progress! I'm gonna go re-size some images!!
  10. Jeez, I misspelled two titles in one day!
  11. Actually, that is the exact phrase I use to describe the course to people. In hindsight it wasn't the best preperation for a career in IT. I have learned alot more valuable skills on my own. Is this refering to the thumbnails just being resized rather than having seperate smaller versions? I have considered that and will rectify it soon Thanks for the comments!
  12. Wow, thats a good start! Was so concerned with checking the grammar in the message that I neglected the title! Worst first impression ever!
  13. Hi all I have recently finished the development of my first full website. It can be found at www.cryhopecryfury.co.uk. The actual content (demos, videos etc) aren't finished yet, but the sites structure is there. I am hoping to find full time employment in web development and have been wondering exactly what employers will be looking for in prospective recruits for a junior role. I have a degree in Applied Computing and now have an example of what I can do online. I think the site displays alot of my skills and knowledge, especially the back end which contains extensive and robust CMS functionality (hopefully demonstrating strong server side scripting capabilities). So I would really appreciate everyones advice on how best to put myself out there with regards to job vacancies. Does the site demonstrate a strong skill set or do I really need to up my game. Anyone who would like to see the cms area just let me know and I'll PM you a temp username/password. Thank you for reading!
  14. not really..... I was hoping for some advice. I have created two user profiles for the database of my site. When somebody logs in to the admin area the scripting uses the information to decide whether to use one profile or the other (namely me@localhost if I login, and guest@localhost if anyone else does). I want to have this functionality so as to allow visitors (prospective employers) to explore the back-end of the site without being able to alter anything (it will also show them that I am versed in database user permissions I hope). My issue is that while this works on my own machine at home in wamp, it doesn't seem to on my hosts server. Having contacted my service provider they have told me that their hosting program plesk doesn't allow users to have varying privileges and that the only privileges allowed are global fo every user. Is this right? Seems like quite a limitation to me. Am I going to have to accept that I can't have users with different privileges? Any advice will be warmly embraced! PS: heres the site, my first so far: www.cryhopecryfury.co.uk
  15. Thanks for the replies! I decided to re-visit font squirrel and download a new kit. Having followed the original css code it supplies more truly things seem to be working now! Thanks again guys!

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.