Jump to content

xtian

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Everything posted by xtian

  1. * This view is a simple list o items with parent-category taxonomy. + A |- 1 |- 2 + B + C * The list should sort first on the parent-category in the same order as listed on the vocabulary page (I assume this is TID)--not editable in views, but on the taxonomy page--and then by the item order. * Within each parent-category the list of child-items is to be custom-sortable (using draggableviews). -------------------- Basic settings Page settings Relationships Arguments Fields Sort criteria Filters Name: Page - Admin Path: list-admin None defined None defined Taxonomy: Term ID Term ID Content: Weight asc Node: Published Yes Style: Draggable Table Menu: Normal: List... [/td] Taxonomy: Term Term Taxonomy: Term ID asc Node: Type = Menu item Content: Weight 9999 Node: Title Item Node: Body Item description Content: Price 9999 Content: Has rule 9999 DraggableViews: Parent Parent [td] DraggableViews: Order Order What I'm getting is a list of items which is not grouped by parent category (taxonomy) and is completely reorderable. Term ID----Term----Item Weight----Item Title-----Body + (40)-----List A----[menu]----------A-1------------ some text + (60)-----List C----[menu]----------C-1------------ some text + (50)-----List B----[menu]----------B-1------------ some text + (40)-----List A----[menu]----------A-2------------ some text
  2. ...leaving the original incomplete post--half of a sentence compared to the replacement four paragraph post. From my perspective, I returned to phpfreaks the next day, believing I had mistakenly posted only one line of my original post, I commented with an apology and reposted. This reposted--complete--post was then deleted. Each time the admin's correction failed me and the community by deleting the corrected complete post and leaving the incomplete post. I understand this for the first deletion. The admin sees a duplicate and deletes the newer, believing the older is already begun. However, deleting the third post, I can not understand why it would not occur to read the post. A simple cursory glance would reveal an incomplete thought. The warning PM did not mention the deletions. Again, from my perspective, I see only the persistent block to my attempts to correct my mistake. It smacks of willfulness to me-- ignoring my apology and continuing to punish my mistake. Chris
  3. No flames. No troll baby births. I'm extremely disappointed with an action taken by a moderator at PHP Freaks. I posted on a topic only to find my post edited to partial first line the next day. Believing this my own mistake I later found my second, complete post, deleted--leaving only my incomplete post. X
  4. Strangly this topic was not posted complete. I will repost this...
  5. I'm reworking a script to write a file in one directory to write another file in a second directory. This works on my testing machine. My shared host, however, is not taking to some of these
  6. I understand your opinion now. I think it over states my focus. I had hoped my examples would be followed by others who wish to contribute other ball and chain depreciated tags...
  7. That's what I'm trying to figure out. And, I'm not hearing any crippling downsides for commercial web pages and certainly not seeing it in the examples I'm looking at. Chris PS. Funny about google. lol
  8. Out of the last five companies to make the cut for the Fortune 1000, 2010, three use either align property for a tag and or font tag. Again, and I'm just wondering, where is the line between evangelism and practice?
  9. And I have no problem with that. In-line html tags such as <font> are depreciated. This is a problem only when someone turns off CSS. And why is that even possible? Because, browsers allow users to do it. Which means someone out in the great WWW is using this, for various reasons, and I can't ignore that. When is it going to hurt me if I use <font color="####">? Chris
  10. The keywords for this search hit too many, so I'm gonna take a risk no one else cares to style their NON-CSS pages. Its my goal to have a page I'm working on be viewable without CSS or JavaScript enabled. The page really looks best when the elements are aligned to the center of the page. Also, For other reasons, the page needs to be xhtml strict. And there's the rub. strict don't pass this as valid. Is there a way to hide these old html rules to pass the muster? Chris
  11. Update. I did an analysis of the various inputs. Its not likely a MySQLs error, but a problem with my variable scope. This form has an instance where, if the user does not select certain options when they first submit the form, its returned with completed options uneditable and remaining options highlighted. The uneditable options exist in this form as labels and printed variable values. At the end I thought I could get the values back into post simply by declaration. Here is a snippet, ...more form above... print '<label title="Message">Message:</label>'; print $messageForw."\n"; print '<input type="submit" value="Confirm" name="confirmed" />'."\n"; $_POST['message'] = $messageForw; ...more post and vars here... I recognized the form was resubmitting, and there were no input fields to repost those values. I thought to do for post similar with session and assign post the value at the end of the form. And I think this must be why the data is not showing up in the database, because post is empty in these few options, including the lost emails. Either I have to find a way to set the post var or leave the input field and make the background invisible. Any comments bout the best solution? Chris
  12. CORRECTION This is supposed to be, ...stripslashes($value);
  13. Devil's in the details. So what's wrong with this code to cause some email addresses to be dropped? My php query, //The name query var... //Then its saved... $dbSuccess_1 = mysql_query($insertName,$connectID) or die ("ERROR_1 - Unable to save."); //Get the name insert ID $lastMysqlID = mysql_insert_id($connectID); //The email query var... $insertEmail = "INSERT INTO email ( email_addr, name_id )VALUES( '$emailAdr', '$lastMysqlID')"; //Then its saved $dbSuccess_2 = mysql_query($insertEmail,$connectID) or die ("ERROR_1 - Unable to save."); I have a general set of filters for $_POST data from a user form, (NOTE= where I note the following is recursive, thats where I removed the function and just displayed the operative code tag) $_POST = array_map('trim', $_POST); // recursive use of... ...array_map('f_stripslashes_deep', $value) : // recursive use of... ...strip_tags($value, '<a><br><em><i><b>'); // recursive use of... ...htmlspecialchars($value, ENT_COMPAT, 'ISO8859-1'); $_POST = array_map('mysql_real_escape_string', $_POST); Finally the form page has an email filter, filter_var($emailAdr, FILTER_VALIDATE_EMAIL) Then when you look into phpMyAdmin you see some emails are missing, ID email name_id 1 xtian@thatsmyname.com 1 2 2 3 example2@test.com 3 4 4 5 guns@andammo.com 5 6 6 7 7 8 ToYou@gmail.com 8 9 DoDo@Gogg.com 9 10 swf@strange.com 10 Again, there is a filter check. If the email is missing, you can't submit the form. Any obvious problems??
  14. If its lost before it gets to the server, then it should trip the die() error catch. No? And I did ten tests with ten different fake emails....
  15. This is a general mystery. I have two tables for a simple form. One contains names and the other emails. The names table has name and auto increment. The email tables have the email, id, and foreign key mapped with php's mysql_last_id_thingy(). The ids are fine. The problem is, out of ten tests, only six emails were saved. The rest are blank! What could cause such a thing to happen? any ideas? Chris
  16. Nope. This is all custom made from tutorials and code scripties I find under the mattress. X [On a personal note about frameworks... I've never read a tutorial or article really explaining how to make frameworks work for what I wanted, even before I fully understood what I wanted. I'm self taught in PHP and programming in general. When I decided to start learning PHP, I had to make a choice where to start and I went with hand coding.]
  17. What about specifically limiting the php to the admin side of the site. Currently the html is written when the php page is requested by either public or admin users. What type of mechanism or code functions might be employed to write the html page/cache file for the public user when updated? Thus the admin page will both 1) write its own page when requested (as normal php page script) while managing a page's MySQL data, and 2) write the html page presenting that data, or, more specifically, call the existing public php page to be written as the new cache/html page? Or is this strategy completely missing some key concept? Gotcha?
  18. I could really use some advise and ideas on PHP caching. Specifically I'm working on a CMS application and after its completed I realized there is an opportunity to increase performance if some of the pages are cached. And the terms I'm using for search are taking too long to sift through I thonk what I'm looking for could be like a CGI script, but I don't have any experience with that right now. Another idea is to wrap my 'public php' page with a check for an existing cached file, else run the query. And add, somewhere in my existing 'admin php' page, a write to file scriptie to create the cache file. Or something else entirely. I don't know yet. I'd like to read some explanations of projects and scripts that either create a 'push CMS' application, or maybe a 'pull CMS' where the parameters for the cache are not time-based (expiration) but file based (file exist?). Or something else... Kudos and huzz-zaa's for the dude who can put words to my dribble.
  19. I'm looking for some advise and focus to my search for a PHP caching solution. The trouble is most searches return web application cache problems, and time-expire solutions (for constantly updated sites). What I'm looking for, the cache would never "expire". When the site admin makes a change a new cache file would replace the old version. Help me understand what I'm thinking here so I can ask the right questions. Chris
  20. Duuh. Thanks for the explanation. Do you recommend using SERVER_NAME or HTTP_HOST?
  21. I'm working to make my code more portable when moving it between servers. I am trying to use the $_SERVER['SERVER_NAME'] global variable to change the page's URL whenever I move it. <a href="<?php print $_SERVER['SERVER_NAME'].'/index.php';?>">LINK TO SERVER'S HOME PAGE</a> This line is in a php page with this URL, http://localhost/php/tests/link_test.php However this is acting unexpectedly. The current directory of the file is being added before the server name and the link becomes, http://localhost/php/tests/localhost/index.php What am I doing wrong? Chris
  22. Hmmm. I hadn't thought about separating the data in the request. 1) Not sure if you can use math functions in MYSQL request? Then what gave you the idea? I don't understand. 2) My idea was to take the request and parse the result into chunks from an array based on a PHP script. I imagined this would allow me to adjust each chunk if one of them is grossly too large to make the page look balanced and "pretty". What would be the benefit of doing this procedure in the initial request from the SQL db? What logic would make it, as you say, "dynamically expand"? This is exactly what I wanted to hear from the community. An alternative way to approach the problem. I'm just not seeing the benefits yet. 3) I'm not sure I completely understand the logic in code snip #2. You write LIMIT 40, and above suggest 10 items for each column. With my example using 100 total records I do not understand either of these numbers. C
  23. My little project is to display one MYSQL query accross 4 columns (A,B,C,D). Each column is a separate div. Each div will contain a new separate table. Here is my strategy to divide one MYSQL query into four separate arrays (1-4) 1) start with MYSQL query and single $dbq_record_set (ex. 100 total records); 2) Divide: (total number of records) 100/4 (number of columns) equals (default number of records per column) 25; 3) Create four variables for each column using #2 base value. (EG. $col_A_records, $col_B_records, $col_C_records, $col_D_records); 4) Divide $dbq_record_set (100) into four arrays using column variables $col_A-D_records. (EG. $n_array_1[records 1-25], $n_array_2[records 26-50], $n_array_3[records 51-75], $n_array_4[records 76-100]); 5) Start a table; 6) Loop--Assign one record at a time to ASSOC arry with mysql_fetch_array($n_array_1) = $a_array_1; 6.1) Print each record's contents in a table using $a_array_1["col_name"] for how many bits of data in each record; 7) Use 'some kind of conditional statement' to adjust number of records assigned to each column with variable #3 at location #4; Questions? I got the idea. It would be helpful if anyone recognizes this and can suggest changes before I procede to code. xtian
  24. I got it! Thanks Fen, You got me going in the right direction. I had time to look up the AS statement and realized I was using it differently then it was described. Then I looked at how you typed the select statement and it made me think to test my query at the MySQL command prompt before writing the PHP--and your response about the correct results did light a fire under my drawers. I saw that the AS statement was not working as I wanted and I rewrote it to get the unique ID number I needed. Again thanks for getting me going in the right direction. Chris
  25. Its really straight forward. The php code goes through an associative array of the contents of the SELECT statement. The first query I got from the forum. The second is simply the mysql_fetch_array () function that accepts the variable that accepted the results of the SELECT statement, and instruction to generate an associative (keyword) array. This function is set to a second variable. The while loop goes through the second variable each time for each row. The trouble is the row array is not returning the ID value of the list item, and instead gives the category ID even though I used the AS statement to change the ID to ref_cat_id. I understand this to change the keyword the array uses to label that column of data. $row['ref_cat_id'] should access the categories ID, and $row['id'] should access the list item's ID column keyword. Thus I have something like this in PHP: $myResults = mysql_query (the mysql SELECT statement........) /* the whole of the list_items table joined with categories*/ $row = mysql_fetch_array ($MyResults, associative array) /*an array that returns each row of the above */ $row['keyword'] /* access to an individual field in a given row; where keyword is the name of a column in both the list_items and categories tables */ Chris
×
×
  • 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.