Jump to content

Destramic

Members
  • Posts

    960
  • Joined

  • Last visited

Everything posted by Destramic

  1. @requinix thanks, that will work quite nicely
  2. is there a way of having set variables for a specific include?...maybe be easier for me to explain via code <?php $bee = 'yes'; include_one "a.php"; include_one "b.php"; // only b.php can grab $bee var ?> im wondering if I can only pass a var to b.php without a.php being able to use the var also? thanks guys
  3. but that way im gonna have 2 entries of the same item one in Arabic and one in English...not really what I was after unless I somehow have a translation table possibly
  4. basically im going to require 2 variations of the same item and its columns but in two different languages...ummm
  5. I'm developing an arabic site...but also want to view it in English...I'm thinking of using windows translating service (depending on good it is). Now I was thinking of having columns in my table like so...english title, arabic title, english description, arabic description As it can charge for words to be translated...when translating arabic to english I can store the results in the column so they would no longer have to be translated again My question is...is it good practice to have separate columns for different languages?...thank you...any input would be great
  6. But using utc_timestamp would be good practice incase server isn't British as phyco said...thank you for your help guys...much appreciated
  7. Putting it like that it sounds like a near impossible task...specially with languages ever growing...but that you for your example...any solutions and where one would go from here?...just use Google translate?
  8. str_replace("?,","", $var); I want to replace it with nothing...just want to remove any one of the matching characters...but I'm unaware of the regex syntax I need thank you
  9. when trying to decode a array of rows taken from my database I found that the json_encode function doesn't allow you to present you array as (with brackets [ ]) [{"name":"Destramic"}] but returns the array as (without brackets [ ]) {"name":"Destramic"} I looked into the documentation and it doesn't seem as if php offer such a way of having bracket which Is a bit of a problem with passing to jquery (which I've found using their autocomplete plugin) this has resulted in me having to add brackets myself $data = "[" . json_encode($rows2) . "]"; does anyone know if you can encode it with the brackets or readable for jquery...thank you
  10. well I'm not here to fool myself but I know a person who is speaks both languages so I'm thinking on the lines of him translating possibly
  11. Destramic

    regex &,

    hey guys im after the pattern to replace , and & symbols please?...any help would be great thank you
  12. @davidvannis looking good...although the problem with Google translate I.find it's pretty crap...due to some of the times words don't translate correctly...at lot of reading for me I guess...although I could findu someone who knows english and arabic
  13. I apologise admin for multi posts :/
  14. Hey guys I'm after a English to Arabic translation script...although I have Googled it but as you can imagine there's no script of that. Would I have to create a array of English words and then give them the value in Arabic? :/...just wondering if I have any other options...thank you
  15. I apologies for my slowness in digesting this information haha...well I've come to theory that when all data is added to the database then I will use the UC_TIMEZONE() function when selecting the information I could use ? CONVERT_TZ(created, UC_TIMEZONE(), America/Akta) please tell me I've got it haha :/
  16. Ok let me clarify a few things please (sorry)...so when inserting data I set time zone in the query to Europe/London...then when selecting I set the timezone to the user's timezone preference so that when I return the timezone column from my row it would convert to the user's preference? :/
  17. Personally make the colours more natural...it seems too vibrant...and with your content and side menu on the right if your able to put them in a clear section so the site content has a divide? Obviously it's all up to you but if I can give you a idea that you like then winner winner Good luck
  18. Hey guys I've been reading the manual for zend framework 2...I under stand the layout helper...but a bit confused on where and when you would use the view to render and set variables? Would it be when you've disabled the layout helper and not wanting to include header, footer, side menus etc? Hope my question is clear and someone can explain when you would use the view instead of the layout helper
  19. Looking at the manual and as you say using Utc_timezone() to store the date does seem a easier way to do things...how would I select the timestamp then and convert it to another timezone on select?...thanks for your help guys
  20. brilliant article...definitely gonna have a update timestamp ...thank you well I was thinking of using <?php define('TIMEZONE', 'Europe/London'); date_default_timezone_set(TIMEZONE); ?> to set the default timezone so when I used now() in my queries it'll be saved as gmt? and yes like you said I have a column for the user to select his/her timezone but how do I change a timestamp to another timezone? thanks
  21. hey guys I wanting some information on the best way to store a timestamp and how I would convert that timestamp to another timezone please? im guessing I would firstly store all timestamps to the database in GMT OR BST then convert after according to users timezone preference? Is there a good website for this please on how this is possible...thank you
  22. Hey guys im having 2 minor problems with my script if someone can give me some advise please? (all 2 problems are commented on the script itself) 1. highlighting string characters when typed. 2. also im trying to add "Hide Suggestions" at the bottom of my menu so people can turn on/off autocomplete $(document).ready(function() { function search_autocomplete(selector, tags, default_value) { $('#' + selector).focus(function() { if($('#' + selector).val() == default_value) { $('#' + selector).val(''); } }); $('#' + selector).blur(function() { if($('#' + selector).val() == '') { $('#' + selector).val(default_value); } }); $('#' + selector).autocomplete( { source: tags, timeout: 0, select: function (a, b) { $(this).val(b.item.value); //submit }, create: function () { $(this).data('ui-autocomplete')._renderItem = function (ul, item) { // not highlighting when string characters match var re = new RegExp('^' + this.term); var t = item.label.replace(re, "<span id='dropdown-item-highlight'>" + "$&" + "</span>"); return $('<li></li>') .append('<a>' + t + ' in ' + item.type + '</a>') .addClass( 'dropdown-item' ) .appendTo(ul); }; } }); $(this).data('ui-autocomplete')._renderMenu = function (ul, item) { // unable to show "Hide Suggestions at the bottom of the autocomplete menu return $('<ul></ul>') .append('<a>Hide Suggestions</a>') .addClass( 'dropdown-menu' ); }; } var availableTags = [{"label" : "XBOX 360", "type":"Electronics"}, {"label":"XBOX One", "type":"Electronics"}, {"label":"Nike", "type":"Clothing & Footwear"}]; search_autocomplete('query', availableTags, 'Search...'); }); thanks
  23. helpers are able to be turned off buy using this style .ui-helper-hidden-accessible { display: none } although after solving that one problem I have come across another...my unable to view my source, which might have something to do with the way I have my array? $(document).ready(function() { function search_autocomplete(selector, tags, default_value) { $('#' + selector).focus(function() { if($('#' + selector).val() == default_value) { $('#' + selector).val(''); } }); $('#' + selector).blur(function() { if($('#' + selector).val() == '') { $('#' + selector).val(default_value); } }); $('#' + selector).autocomplete( { source: tags, timeout: 0, create: function () { $(this).data('ui-autocomplete')._renderItem = function (ul, item) { return $('<li>') .append('<a>'<br>' + item.product + ' /a>') .appendTo(ul); }; } }); } var availableTags = [{"product":"XBOX 360", "Type":"Electrics"}, {"product":"XBOX One", "Type":"Electrics"}, {"product":"Nike", "Type":"Clothing & Footwear"}] search_autocomplete('query', availableTags, 'Search...'); }); what im wanting is to have the products in my array to be the source...thank you
  24. yeah well maybe it would be better to use paypal or something to do the transactions...thank you
  25. yeah that is just what I need some styling..but like I said when the results drop down box appears with suggestions, for some reason further down the page it says how many results available and what result picked?
×
×
  • 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.