Jump to content

digitex

Members
  • Posts

    231
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by digitex

  1. Hey Soma. Very useful module and it has promise to be just what I need for something I'm working on right now but I have a couple of questions: First, I need to upload images of a higher resolution but when I upload through the module interface I get an error that the file exceeds the maxFilesize set in the php.ini. The php.ini maxFilesize is set to 10mb and the pics, so far, have been well below that. When I use the standard pw image upload the files go up no problem but error out using the module. I notice you set a maxFilesize => 32 default but when I change that it doesn't make any difference. Can you give me some guidance how to set it to match the limit in the server php.ini? Also it might be worth considering adding an option in the module settings to set the maxFilesize. Second, I sometimes forget to set the category before clicking upload and I found that rather than throw an error immediately, the module goes through the process of uploading the file first, then throws the error that no category was set. Since the file's already uploaded, it get's left orphaned in the temp directory. I went into the assets > files > .tmp_uploads and found several pics from days earlier still in there. I can't be the only one that sometimes forgets to set a category which means the server could get clogged with orphaned files pretty quickly. Maybe an onsubmit check for the category before upload begins would fix that.
  2. I keep coming back to this module hoping. I think it's a very valuable add-on for any site in which the admin is not the same person as the developer and I get requests for a preview all the time. I downloaded the latest version (module pages says last update was March 29 2014) but I am a bit confused on a couple of things. The install instructions are: First you should update the text to change AutoUpgrade to ProcessPreview. Where does the preview.php page come from? Do I have to create that? The module has write permission but nothing was created automatically. What do I need to put in the preview.php page that I create? Or is it just a container.
  3. OK. I did some further checking and the markup for the modules is in the source set to display: none. If I disable that the page renders correctly and the modules all show up. So to that I say WTF? Why is the unordered list elements set to display none? EDIT TO ADD: I think it's a jquery problem because I discovered none of the jquery functions are working in the page edit. EDIT AGAIN: I tracked it down with the help of the console. It seems that there was an error in the upload, either from my FTP client or the server. Once I tracked down the files that were corrupt (jquery UI and tiny_mce.js) and fixed them everything seems to be back on track. Thanks everyone.
  4. I just installed pw2.4 for the first time on a development server that's already running pw2.3 to begin work on a new project and although the install went fine, no errors reported and the admin looks normal, the site loads etc, when I go to the modules page it's completely empty. It's a shared server but I left the permissions as default when installing because the defaults have always worked fine. The php version is 5.4 MySQL is 5.0.96 and Apache is 2.2.26 As I said I already have pw2.3 running on the same server with a different db and no problems. Has this happened to anyone else? Is there something I missed in the readme that I need to do? If I upload a module to /site/modules/ and click check for new modules it comes up as new module found but clicking on the link in the green bar at the top of the window does nothing and the page is still empty. Screen cap attached:
  5. Nope. The repeater template, a couple of input values as a date range and include=all. I am not on the latest release though. it's 2.2.9 and upgrading would be a bit of work due to a custom login page but if that's the problem I'll upgrade ASAP. I tried this as well, I found it in a search of the forum, don't remember what thread now but it had the effect of rendering no results. weird.
  6. Thanks adrian. Oddly, that doesn't do anything. I logged out to make sure the results weren't appearing because I was viewing the page as a superuser. But no effect. When you click on the link in the results it takes you to the login. Not good.
  7. What is the reason for include=all in a selector to include trashed pages? One would assume a page in the trash would be one you wouldn't want found. I have a search that searches a repeater and the selector includes the repeater template and include=all because otherwise nothing gets returned. The problem is that when a page containing the repeater is in the trash it also gets returned in the results which is undesirable. The site in question has members, the members have pages with repeater and members either renew membership or not. If not they go into the trash but not deleted because often a month or so down the road they change their minds, renew and it's easier to drag their page out of trash than start over. I've tried filtering results to remove trashed pages and excluding pages if their status is trash and excluding pages with trash as parent etc. but nothing works. Is there a standard way to search a repeater without including trashed pages?
  8. digitex

    A matter of ethics

    I believe that to be unethical. There's a difference between illegal and unethical and even though you're right that the license on themeforest themes doesn't legally require credit how much impact would there be to just say in the footer "site by __________. Theme by ___________." The individual that created the theme did the design, artwork, coding, html, CSS, integrated javascript and created a ready to use out of the box website. To then claim it's your work is, in my opinion, dishonest and dishonesty is unethical. It has nothing to do with the budget constraints of the client. I respect your opinion too though.
  9. digitex

    A matter of ethics

    That is cheeky. I've been operating my business in the town I currently live for 14 years now. Not all web mind you, a great deal of print in there as well as some other things and I'm certainly not new to low down conduct but it still always burns me. The problem is that now this guy may fancy himself a web designer and approach others and of course most people love getting things cheap. If I say anything against him for his unethical ways or the fact he doesn't do a thing other than install Wordpress and a custom theme which is, let's face it, ridiculously easy, I could come off as a bad guy (sour grapes and such). So I won't be doing that but I hate to see people take credit for another's work.
  10. digitex

    A matter of ethics

    An ex-client of mine, a photographer, decided to do his own site. By that I mean he installed Wordpress and purchased a photographer's portfolio theme from Themeforest. It went well for him and he posted that he did the whole thing himself which made me go "hmmm" but afterward he went to another client of mine and convinced her he could do the same for her. I lost that client when he installed Wordpress for her and purchased a different theme geared to her industry. That's not nice but not unethical really. I make sure my clients have the ability to control their own site in every way, including who they do business with. The unethical part is once again he put "site by.." with his name at the bottom. That may not be illegal according to the terms of Wordpress and the theme he purchased but I find it highly unethical. Am I off base? I'm not going to rat him out to anyone but am I alone in thinking taking credit for the site when all he did was install it is low and slimy?
  11. Thanks for the response Ryan. I picked up form builder. I can see it would be very useful for a number of projects I have already completed but there are still some concerns I have with this instance. I saw the bit: Preset field values from GET variables that says When checked, if a GET variable is present with the same name as a form field, the form field will be preset with the value from it. Which is great but the client specified that the lot number field be the page title because when administrating they go by lot number and it makes it easier to navigate to the proper page. But that means the GET variable won't have the same name as the form field. Or am I missing something? I was hoping that the custom embed method might have configurable options similar to Soma's Simple Navigation echo $forms->load('bid_form')->render(array ( 'initial_value' => lot_number = $page->lot_number )); ); Or in the backend under initial value you maybe could select a field from there. EDIT: OK. Just got access to the form builder support forum and I see this is already addressed. You da man Ryan. I will be licensing this many more times. Buy yourself something nice!
  12. Hey Ryan and the pw forum. I got a question that I hope someone can help me with: A got a guy who's doing an auction of sorts on his pw site. It's not an ebay type thing it's for a limited time on a specific set of items. Each lot is a page with a repeater for the items in the lot and they all display on the frontend page using a foreach loop. When the bidding is enabled a little "bid" button shows up beside each lot number and when clicked will pop up an overlay form for the bidder to fill out with their info and bid amount. I want the form to auto populate the lot number and have a timestamp inserted on submit. I was going to do it with the tectite formmail and ajaxsubmit so that it doesn't redirect but I read up on form builder and thought it would do what I want easier and better. I just want to confirm I can manually include the form in a foreach which will create multiple instances on the page and auto fill in the lot number etc.
  13. I had a hell of a time getting the map to show up as well, until I realized the Google map API is not compatible with jQuery 1.9.1. I swapped in jQuery 1.7 and suddenly it's Miller time.
  14. Adrian. Thank you. That'll work just fine. An easy to implement solution but not one I would have thought of on my own.
  15. I have stepped out of my league. I have a competition results page that I'm working on. It's an agricultural fair with a largest vegetable weighoff and since each grower entering the competition usually has multiple entries I opted to create a grower page with name, location, contact etc. for each grower and then a repeater to document each entry. The repeater includes a category page select in radio button form so staff can input the category of veg with a single click, plus a results field for the weight. Then if the same grower has another entry they just click the add item button and don't have to keep entering the grower's personal information. I need to output the data and organize by category first then the weight in descending order. Since the category is in a repeater I created a new array and added in the relevant data for all the growers and their entries. Then I used a trick I found here to sort using usort first by category then result (weight) and it works. Code is here: <?php $ag = $pages->find("template=grower, $selector"); $wor = array(); foreach($ag as $g) { foreach($g->$weighoff as $gent) { ++$i; $wor[$i]->cat = $gent->grower_category; $wor[$i]->res = $gent->grower_result; $wor[$i]->ln = $g->grower_lname; $wor[$i]->fn = $g->grower_fname; $wor[$i]->twn = $g->grower_town; $wor[$i]->pst = $g->grower_province; $wor[$i]->oth = $gent->grower_otherspecific; $wor[$i]->lth = $gent->length; } } if($weighoff == grower_entry_A) { echo "<h2>Saturday Weighoff results for {$fyear}</h2>"; } else { echo "<h2>Sunday Weighoff results for {$fyear}</h2>"; } echo "<table id=\"reslist\">\n"; echo "<tr><th>Category</th><th>Name</th><th>City, Prov/State</th><th>Result</th></tr>\n"; function sort_results_by_category(&$wor) { usort($wor, function($a, $b) { if($b->cat == $a->cat) return $b->res > $a->res; else return strcmp($a->cat, $b->cat); }); } sort_results_by_category($wor,array("cat","res")); foreach($wor as $result) { echo "<tr><td>"; if($result->oth) { echo "<span class=\"catem\">{$result->cat->title}: {$result->oth}</span>"; } else { echo "<span class=\"catem\">{$result->cat->title}</span>"; } echo "</td><td class=\"resname\">{$result->ln}, {$result->fn}</td><td class=\"resloc\">{$result->twn}, {$result->pst}</td>"; if($result->lth) { echo "<td class=\"resnum\"><strong>{$result->res} inches</strong></td></tr>\n"; } else { echo "<td class=\"resnum\"><strong>{$result->res} lbs.</strong></td></tr>\n"; } } echo "</table>\n"; ?> It displays like this: Category1, name, location, result Category1, name, location, result Category2, name, location, result Category2, name, location, result etc. The problem is they want it to display like this: Category1 name, location, result name, location, result Category2 name, location, result name, location result etc. And I've tried everything (in my limited arsenal) and I can't figure out how to organize the output and I can't even decide if it might be a simple thing I'm not seeing or if I have to rethink my whole approach. Can anyone see what I'm missing?
  16. Yes. I didn't even see the unlink when I incorporated the code but after reading yours and Horst's post i double checked. It's all in order and works like a charm with the exception that it doesn't delete. It's not a big deal as the server space is more than enough to accommodate the images and I can manually remove them. In my case it is a photo contest and entrants will be uploading high res images so I will have to monitor it. Since the submissions are open to the public now (it was a rush which is why I was so happy to see complete code ready to use out of the box) I won't trouble shoot much until the deadline expires. EDIT: I did a new test with a low res image (about 82k total) and it did delete on completion. Maybe it is working just not so well with the large files I was testing with previously.
  17. I have the unlink ($pathname) in the code I'm using. The uploaded files are not being deleted though. Funny. I'll have to reexamine it. Everything works except for the file removal at the end.
  18. Hi guys. I just happened to need a method of allowing image uploads and what do you know? There's a whole thread dedicated to it. Matthew, nice work. Thank you. I have only 2 things to add: 1. The code as is makes the assumption that each user will only ever upload one image or that there are no people with the same name. Since the title is derived from the contactname an error is thrown if a second upload is made with the same name. I added: $n = 0; $np->title = $sanitizer->text($input->post->contactname) . "-" . (++$n); It ensures each upload will get a unique ID. 2. I noticed the images uploaded to the .temp directory don't get deleted. With extensive use this will lead to lots of wasted server space as the .temp folder gets more and more bloated with duplicate images. Is there a way to solve this? You made my job very easy anyway thanks again.
  19. I've wanted to add this myself. While a big highlighted word may be distracting (right Dave?), finding the particular reference you searched for in a big page of text is equally frustrating and some form of delineation of the search term is helpful. However, since the search results page only displays the title and summary, often the search term itself isn't present on the search results page and the highlight doesn't actually get a chance to work. It helps to be able to pass the value of $q onto the page the user clicks in the search results. As Soma suggested, the easiest way that I found to do that (although there may be a better way) is to add: foreach($matches as $m) { $out .= "<li><p><strong><a href='{$m->url}?q={$q}'>{$m->title}</a></strong><br>{$m->summary}</p></li>"; } Which then passes $q onto to the next page so it can be accessed by .highlight. Works for me. Simple and easy on my brain. I should add you then need to add the following to the script at the bottom of the page: <script> $("body").highlight("<?php $q = $input->get(q); echo $q; ?>"); $(".highlight").css({ backgroundColor: "#FFFF88" }); </script>
  20. looks like u. right. Not workin wit ver 2.2.9 That may have just saved me a wack of trouble. Didn't realize it was 2.3 compatible only. Thanks Willy. Edit June 18: upgraded PW to 2.3 and twitter feed is up again. Note to self: read compatibility before spending 5 hours troubleshooting.
  21. Last report before I give up on this S---. I went ahead and updated the module on a different site, different server, same version of PHP but different host and it worked like a charm. So, now I'm a little closer to figuring it out. The problem site has another issue. I tried to uninstall the MarkupTwitterFeed module and got a new error. It won't uninstall. I might try going in through PHPMyAdmin and doing it that way and then see if I can start over with it.
  22. Hey Arjen. That's where the different errors came from. Originally I had: $t = new MarkupTwitterFeed; Which returned "Error retrieving Twitter status" which at least proved the module was installed and working. I switched to: $t = $modules->get('MarkupTwitterFeed'); which is when I got "Error Call to undefined function wireRmdir() (line 195 of /home/checkere/www/www/site/modules/MarkupTwitterFeed/MarkupTwitterFeed.module)" I then abandoned the module for Twitteroauth and used: <?php session_start(); require_once("twitteroauth/twitteroauth/twitteroauth.php"); //Path to twitteroauth library $twitteruser = "digitex"; $notweets = 3; $consumerkey = "1234345667"; $consumersecret = "244556667"; $accesstoken = "23456676788"; $accesstokensecret = "2345667889"; function getConnectionWithAccessToken($cons_key, $cons_secret, $oauth_token, $oauth_token_secret) { $connection = new TwitterOAuth($cons_key, $cons_secret, $oauth_token, $oauth_token_secret); return $connection; } $connection = getConnectionWithAccessToken($consumerkey, $consumersecret, $accesstoken, $accesstokensecret); $tweets = $connection->get("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=".$twitteruser."&count=".$notweets); echo json_encode($tweets); ?> Which worked and loaded the feed but not in a very presentational way. I'm convinced now the twitter app I created is correct but the implementation with or of the module is not. I'm not suggesting the module doesn't work since it obviously does for others, just that something is set up wrong for me.
  23. I'm glad vayu solved his problem but I can't solve mine. I have updated the module, created a twitter app and retrieved the consumer key & secret and access token & secret, entered them into the module settings but still get "Error retrieving Twitter status". Is there some extra step when creating the app? Their documentation is horrible. It seems for the module to work all I should need is the oauth settings and any other info in the app is arbitrary (i.e needed for the app but not for the module. What am I missing? EDIT: I've got a new error message: Error Call to undefined function wireRmdir() (line 195 of /home/checkere/www/www/site/modules/MarkupTwitterFeed/MarkupTwitterFeed.module) Maybe I should see about using the embedded feed for now.
  24. Thanks Horst. I'll see if I can make this work.
  25. I have a situation right now, I'm not sure how unique it is or how easy it would be to solve. I have a group that runs a carshow that maintains their registration list on a custom built database application. They currently have the ability to export a .dbf file and import that directly into their website so registrants can confirm their paperwork is done. I'm redoing the website and now I'm struggling to figure out how I'll be able to give them that same option. I'm not sure how different a .dbf is to a .csv so is it possible to customize the csv import module to allow a .dbf? Are their any other options? Certainly there's software that allows for a .dbf to be converted to .csv but that's extra steps I'd prefer not to have to impose on them. I could also convince them to try to get the original database application changed to export .csv instead of .dbf. That's a last resort though. Any suggestions would be appreciated.
×
×
  • Create New...