Jump to content

garek007

Members
  • Posts

    14
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

garek007's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. sweet thanks. Maybe I'll try it. I did a test with a coworker where we both hit submit at the same time and it still wrote. Now I'm sure it's more complicated that that, like we probably were milliseconds apart, but I also added a safety so that it also emails me the form data. This way, I have a backup in case it doesn't write. Maybe by the end of the week I can get the mechanism in place to write to the DB. It doesn't look too hard and I think I saw some code earlier when I asked THE GOOGLE.
  2. hey thanks for that. what do you mean doesn't work on windows? just the LOCK_NB flag doesn't work on windows? Or the whole thing? If I do it with mysql instead, do I still have to lock the database while it's writing? or is it a lot more straightforward? By that I mean, will SQL police itself for simultaneous attempts to write?
  3. I was just going to open the file and add to the end of it... not overwrite it each time. That won't work? I hadn't thought about simultaneous submissions though... Our audience will be small, but I suppose it could happen...
  4. Hi, I need to create a landing page with a form. That form needs to be recorded somewhere instead of sent to email. I know I can write it to a SQL database, and then to an excel file. But I only need a temporary solution so I figured I'd just go straight to CSV. Is this bad practice? What potential problems might I encounter other than security issues?
  5. No worries, I figured out a different way to accomplish what I needed. I imagine I'll read about this and eventually learn what I need to know. Thanks for your help though!
  6. Mahngiel. Sorry I should have specified. ignore the first Itemid (capital I). That is accessing the Joomla database. The second itemid (lowercase I) is used to go through the object. That foreach loop actually works fine, it was default and I am still trying to modify it. It works fine, but I just want to understand what is happening.
  7. Hi, I'm using the Joomla CMS and I encountered some PHP code I'm really struggling with. I'm hoping someone can help me. The code appears to loop through an array, but I discovered that it's not just a simple array. I discovered this when trying to iterate through it myself with a foreach loop. The loop failed, and I found that the item being iterated was an object??? So that means it's a little more complex. So i did a varDump and found out that it is indeed very, very complex. I just want to understand the foreach loop and what it's doing. I understand it as it pertains to a simple array, but this is not a simple array. Here is the code. (the switch statement was added by me) foreach ($list as $i => &$item) : $class = 'item-'.$item->id; switch($item->id){ case 103: if ((in_array($Itemid, array(109, 110, 111,112)))){$class .= ' active';} break; case 104: if ((in_array($Itemid, array(113, 115, 114)))){$class .= ' active';} break; case 105: if ((in_array($Itemid, array(116,117,118)))){$class .= ' active';} break; default: break; } if ($item->id == $active_id) { $class .= ' current'; } if (in_array($item->id, $path)) { $class .= ' active'; } elseif ($item->type == 'alias') { $aliasToId = $item->params->get('aliasoptions'); if (count($path) > 0 && $aliasToId == $path[count($path)-1]) { $class .= ' active'; } elseif (in_array($aliasToId, $path)) { $class .= ' alias-parent-active'; } } if ($item->deeper) { $class .= ' deeper'; } if ($item->parent) { $class .= ' parent'; } if (!empty($class)) { $class = ' class="'.trim($class) .'"'; } //===================================================================== echo '<li'.$class.'>'; // Render the menu item. switch ($item->type) : case 'separator': case 'url': case 'component': require JModuleHelper::getLayoutPath('mod_menu', 'default_'.$item->type); break; default: require JModuleHelper::getLayoutPath('mod_menu', 'default_url'); break; endswitch; // The next item is deeper. if ($item->deeper) { echo '<ul>'; } // The next item is shallower. elseif ($item->shallower) { echo '</li>'; echo str_repeat('</ul></li>', $item->level_diff); } // The next item is on the same level. else { echo '</li>'; } endforeach
  8. ok thanks. I don't think it will, yet, but I'll have to try to get it to do so. Do you know of any tutorials that talk about making clean urls? I don't have a database set up, this will basically all be happening by javascript after the initial page is loaded.
  9. Hi So I have a setup that looks like this file-00.html //the navigation file, all files below pull this file in file-01.html file-02.html file-03.html // you get the idea So I defined all variables in a new page that I'm just calling "file.html" It will be the only page and because I don't have other pages I can do away with file-00.html and just drop the navigation right into "file.html" I then load different flash movies in and change the page title based on which buttons are clicked. Now I'm wondering, is it bad to have a setup up this way in terms of SEO? Will Search Engines and Google still find my one page? There will be PHP variables defined in it, but they will not be separate physical pages. So is this a bad idea? and what's going to happen when someone does a search will they find this page? if they do what might they see? Thanks again, STan
  10. Thanks I didn't think so. I had another idea as I was doing this, I'll post it now. It's relating to SEO
  11. Hi, I'll try to explain this as best I can. I have a document that gets included into another document. This document is a navigation pane and simply holds links to other documents. I'm wondering if I can define a variable in the page that my navigation document is linking to and use that variable to set the text using an echo statement in the navigation document. See it seems weird, seems like a loop. I want the document that it links to, to define the link itself. Can that be done? Thanks, Stan
  12. Ok just to be sure, so this is ok to use, it's 'good technique' and my blog.html file will NOT pop up without its parent right?
  13. Hi, I'm pretty new to PHP. So far I love it, it's effing awesome! Today I decided to do something to make life easier. I have a home page and it has a blog section. I took all my blog entries and placed them in a separate html doc and used an include on the home page. So my question is, when Google, Yahoo, Msn, etc do their indexing, will they find these entries as part of my home page? And if not, how can I make it so when blog.html opens up it automatically calls its parent document? Thanks, Love these forums! Stan
×
×
  • 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.