Jump to content

Allstar

Members
  • Content count

    55
  • Joined

  • Last visited

About Allstar

  • Rank
    Dedicated Member

Users Experience

  • Experience
    Intermediate
  • Area of Expertise
    Designer/Coder

Profile Information

  • Gender
    Not Telling
  • Location
    Thunderbird 5
  1. I started looking for a wordpress plugin that would allow me to publish a post to a Facebook group, also if I wrote a post in that facebook group my wordpress could create a post based on it's details. I'm fairly certain I did this with Facebook Pages and my User profile at some point. Looking at the plugins they all mostly seem to be very old / not updated much. Looking at the Facebook API there were some big changes in October 2016 relating to groups. It is my understanding that I can't publish via facebook.com/group/{group-id} and I have to use an app? The API pages point me to use a different "edge" what is an "edge"? I understand a bit about SOAP and REST calls, I've sent stuff too and from Twitter but I would not call myself fluent but I could bumble my way to a solution with some broad stroke guidance.
  2. I've just got started with PDF forms. I've designed a form in InDesign CS6 including a Combobox with 21 items. I export to PDF just fine. In Acrobat: When I click on the combobox the list appears but only the first 17 items are shown. If I click and item and use the down arrow I can get to the bottom, missing 4 items. If I go to edit the form field, using properties and the options tab all 21 items are listed. If I reorder them they are still limited to the first 17 items. Is this normal? Is it possible to have a combo box with more than 17 items? Don't mind using a bit of Javascript. There is plenty of space for the dropdown to appear.
  3. I joined a website host a few years ago. Things were good. In October my sites got hacked. They were very unhelpful, blocked my access to files and databases and levied a large fine which was the cost of 2 years hosting. Ridiculous! So I took my business elsewhere via a backup and I've not been re-hacked (new precautions) and in fact business has gone up! Happy times. However I've found I'm missing bits of content that are crucial to an organisation on one of the sites I was hosting for them. I still have 3 months left on the hosting with the old company (UK2) and I'd like a copy of all the data stored on their servers. Is there any precedent whereby I can ask for all or part of it on disk or otherwise without paying the fine? I checked the wayback machine and google cache but they do not have a copy of the pages. (I'm surprised the organisation didn't notice until now as I did ask them to check everything after their site had been down for the day and I put up the couple days old backup.)
  4. // the 'common' translatable ways: echo sprintf( __('I love %1$s and %3$s','translate_domain'), 'Apple', 'Banana', 'Coconut'); or echo vsprintf( __('I love %1$s and %3$s','translate_domain'), array('Apple','Banana','Coconut') ); // what I'd like to do $array = array( '%alpha%' => 'Apple', '%bravo%' => 'Banana', '%charlie%' => 'Coconut', // ... '%zulu%' => 'Zucchini', ); $translated_text = __('I love %alpha% and %bravo%','translate_domain'); // And then send to function to replace the tokens Hopefully the comments in the code are useful. The issue is the token replacement, I'm under the impression that text variables such as %1$s and %3$s are common (used by the sprinf function) in translatable text but I'd like to pass some more meaningful variables. Am I allowed to put meaningful tokens (%... ...%) into the text to be translated and the translaters out there be okay with it? Or to put it another way: How to translate when the sequenial order of tokens being passed changes ie Coconut isn't going to always be %3$s?
  5. I'd like to detect any link on any sub-directories and sub-directory files and redirect them to the equivilent address on a new URL. However there are some file on the old URL (about 860) that need to stay on the old URL and still be accessed. I can forward any URL to the equivilent quite easily using htaccess (apache) but I don't know how to do the exceptions. I can do exceptions via PHP using the file_exists() function if that helps but I don't know how to send all incoming addresses to the index first for a check and then to the correct destination. Happy for a solution using htaccess / mod_rewrite on it's own or with a little help with PHP.
  6. I'm running an app in a subfolder (or subdomain if need be) and I want to block that entire folder (or subdomain) from being indexed by searched engines. However I don't want to put the rule to exclude the folder/subdomain in the main domains robots.txt file. I also don't want to have to put the robots meta tag on all pages of the app. How can I block the folder/subdomain from being found by search engines with the above critierion?
  7. So I've started to move my domains (not hosting) to a new registrar. Seems the domains I've got "domain privacy" on when I "unlock" the domain and start the transfer I'm supposed to get an email. The email in place of mine, isn't forwarding to my email. (I've a couple domains that don't have the privacy and they've gone through no problem.) Seems I've been paying to "protect" myself and hindered myself from moving the domain away from the current registrar. Is there a way to unlock a domain via the actual email a domain is registered with rather than the "private" one? Or does the "private" one completely replace the data of the actual one? Is there a way around this?
  8. Until recently I've had a 123-reg account and a hosting account (which handled the hosting and the domain names). At some point I started to intermingle the use, 123-reg domain pointing at hosting DNS. And things were fine. Now I wish to consolidate my domains via transfer into one place (that is incredibly trustworthy), continue to use my hosting but at a much much later date change that too. Now I've search these boards and I've seen some mixed tales of 123-reg, both good and bad. Currently since most of my domains are dot com each one will cost £13 to transfer to 123-reg from the hosting company. Is this a smart move to make or should I look further afield than 123-reg? Recomendations are fine but really I'm just like some affirmation that what I'm planning to do is wise.
  9. Reusable jQuery event handler for class dropdown

    Brilliant! Brilliant! Brilliant! +1 and may you have the best of luck for the whole of tomorrow! Thank you!
  10. Reusable jQuery event handler for class dropdown

    How will the script know which of the many classes of .star-widget-id to access? See example below please. I'm not replacing it with 7 I'm replacing it with the return data from the AJAX call which takes "7" and returns a bunch of HTML that I want wrapped in what is the example of "div#star-message-7". Originally the return re-wrapped the HTML in a div exactly the same as the one it was replacing whereas with the code below I don't need to do that anymore. Thank you very much. Still have a problem though. That is very useful to know, as I say I am a novice with jQuery, this has taught me something I didn't knew about. Still not quite sorted yet. If we take this to the extreme example, we do this: <?php for ( $i = 1; $i <= 101; $i++ ) { ?> <aside> <form method="post" action="#"> <input type="hidden" class="star-widget-id" name="star_widget_id" value="<?php echo $i; ?>"> <select class="star-dropdown" name="star_dropdown"> <option value="one">One</option> <option value="two">Two</option> <option value="three">Three</option> </select> </form> <div id="star-message-<?php echo $i; ?>"></div> </aside> <?php } // END for loop ?> Then there are many dropdowns with class="star-dropdown", all which have a change event monitored on them, which is why I thought going upto the parent() form of the dropdown being clicked then down into the child <input class="star-widget-id"> I would have the ID in the hidden input next to the dropdown but I don't get that, whichever of the 101 dropdowns I click I only get the ID of the first 1 and thus only ever the first message area gets updated (since it is found by its ID with the number in). I can update the first message area but I can not update the one adjacent to the dropdown. Perhaps I've said the problem a little better now? Sorry for not being more exact. You've certainly made things easier, so thanks again for that, I'm still a little stuck though.
  11. I'm not very experienced with JQuery, great with PHP, HTML etc but I'm so-so with AJAX and I'm having trouble using mutliple instances of JS functions. Namely I've attached a "change" event to all dropdown selects on a page with class="star-dropdown". Adjacent to the dropdown is an intput with an ID value in and another div with id="star-message-ID". In the HTML below I've used "7" as an example. MY AJAX definitely works once. Regardless of which dropdown I change the the highest message area up the page source shows the message of the highest drop down up the page. I would have thought that since I am capturing the id of the .star-widget-id closest as a variable it would be used but it isn't. I imagine the problem is with the class selectior since I would like this to be used whether there are 1 or 999 of these on the page and I don't want to have to code an event for each one!! jQuery(document).ready(function(){ jQuery(".star-dropdown").change(function(event){ var widgetid = jQuery(".star-dropdown").parent().children(".star-widget-id").val(); jQuery.post( MyAjax.ajaxurl, {action : "ajax-submit", star_dropdown : widgetdd, star_id : widgetid}, function(data){jQuery("#star-message-" + widgetid + "").replaceWith( data );} ); }); }); <aside> <form method="post" action="#"> <input type="hidden" class="star-widget-id" name="star_widget_id" value="7"> <select class="star-dropdown" name="star_dropdown"> <option value="one">One</option> <option value="two">Two</option> <option value="three">Three</option> </select> </form> <div id="star-message-7"></div> </aside>
  12. Can you make one of these?

    I'm pretty sure you could find a free to redistribute version out there, some student must have done one. You'd have to include the license its done under and you won't be able to charge too much without annoying the client (since you've only used your expertise to 'look'). But that 'project' will be done quickly so you can move on to the next.
  13. Easier way to get Array elements by List of Keys

    Thats compares keys, which is fine but I would have to make the second array full of dummie values with the keys I wanted to find the intersect from the first array. Nice try but no dice.
  14. function array_keys_and_values( $keys,$array ) { $values = array(); foreach ( $keys as $key ) { if ( isset($array[$key]) ) { $values[$key] = $array[$key]; } } return $values; } This function gets the elements (key+value) from $array that have a key which is in keys. The default PHP functions let me get keys or values but none stands out that do this. ^^ Wouldn't mind so much but occassionally doing it a 1000+ times in a submit something better would be a nice way to improve efficiency.
  15. Can someone please enlighten me? (PHP)

    Good analogy is: If HTML and CSS is addition, subtraction, divide and multiply (+ - / *) numbers You write out a set of rules / sums and they are used as is. PHP is algebra addition, subtraction, divide and multiply (+ - / *) letters You write out a set of equations and they are used many different ways.
×