Jump to content

krembo99

Members
  • Posts

    22
  • Joined

  • Last visited

    Never

Everything posted by krembo99

  1. I have him determined the criteria .... But this is exactly my question, I can determine the "+" the "-" and also the "|" (or) , but can not find how to determine "ALL" ..
  2. Thanks for replying , I was starting to think no one see this post ! well, this is a part of a system that is generating graphs for an automated distributed warehouses chain I have ONE graph, that a user can change parameters. the parameters are : Country , City , Supplier ,product , Client, Warehouse. the search is to populate the array to generate the graph. So the user can generate a graph for example Germany (-) berlin (-) supplierX (+) productY This will generate a graph from germany, EXCLUDING teh city of berlin , EXCLUDING supplier X and INCLUDING ONLY product Y The problem is : how to make , with the same feature ,for example : ALL COUNTRIES (-) productX (-)Supplier Y (+) ALL warehouses I hope it is more clear ....
  3. Hello all.. I am using a FULLTEXT search on my database (yes, I know it is slow..) , creating a user defined filters , and later plotting a graph.. A user can choose between country, product, warehouse, customer, and any boolean combination of the above to plot a statistics graph. SELECT client_name,count(client_name) as unit,sum(pic_sale_price) as gross FROM mgminibar_reports_view where MATCH (client_name) AGAINST ('Client_name' IN BOOLEAN MODE) group by client_name example: plot graph for Germany , all Warehouses (MINUS) WarehouseX + US (minus) Florida - CustomerY.. It works ok, but I have one problem... I can not find the way to make (Select All) . (Or in other words, Using a wildcard without appending a string to it ) For example , Germany, ALL Clients, or All COUNTRIES , ALL PRODUCTS. I could not find anything in the reference .. in the code here below : SELECT client_name,count(client_name) as unit,sum(pic_sale_price) as gross FROM mgminibar_reports_view where MATCH (client_name) AGAINST ('Client_name' IN BOOLEAN MODE) group by client_name what would be the operator to Select ALL clients ?? I tried SELECT client_name,count(client_name) as unit,sum(pic_sale_price) as gross FROM mgminibar_reports_view where MATCH (client_name) AGAINST ('+*' IN BOOLEAN MODE) group by client_name But did not work... How to use a wildcard WITHOUT appending it to a search term (ALL) ??
  4. IF someone is having the same problem : I have resolved it by just dropping the double quotes ("). The ING SRC still see the path even with no quotes.. from echo '<div><img src="'.$attachmenturl.'" /></div>'; to echo '<div><img src='.$attachmenturl.' /></div>';
  5. yes, it is defined within the WP system, and in fact, outputs the RIGHT url ..... The PHP part , is not the problem IMHO.. the problem is that the <img> closing tag ">" messes up the code... When I put a normal text, all working OK... when I put <img src="some path to image.jpg" alt="something" /> the "/>" part, that actually ends the IMG tag, is parsed wrongly, which results in outputting everything that comes after it , E.G. );" onmouseout="exit();"> like plain text which display over the image, and not seeing it like a JAVASCRIPT anymore, but like text .. in other words, it breaks the code ... I actually see the text ");" onmouseout="exit();">" displayed on the website ...
  6. I have a problem knowing the right syntax to execute PHP inside Javascript ... In one of the templates I made for a WP based I have a mouseover "tooltip" written in Javascript. it is triggered within a <SPAN> tag with calss "tip", like so : <span class="tip" onmouseover="tooltip('text of tooltip');" onmouseout="exit();"> <?php postimage(thumbnail) ?> </span> the <?php postimage(thumbnail) ?> is a function I wrote, that outputs a thumbnail path of an Image... Now, this is working great, when I do mouseover the image, the tooltip text is displayed. But , when I try to replace the tooltip text, with a PHP function like so : <span class="tip" onmouseover="tooltip('<?php postimagehover(medium);?>');" onmouseout="exit();"> <?php postimage(thumbnail) ?> </span> , the whole code is messed up ... (This is the postimagehover function I wrote, if it can help ... <?php function postimagehover($size=medium) { if ( $images = get_children(array( 'post_parent' => get_the_ID(), 'post_type' => 'attachment', 'numberposts' => 1, 'post_mime_type' => 'image',))) { foreach( $images as $image ) { $attachmenturl=wp_get_attachment_url($image->ID); $attachmentimage=wp_get_attachment_image( $image->ID, $size ); echo '<div><img src="'.$attachmenturl.'" /></div>'; } } else { echo "no images found"; } } ?> ) I am sure it is some syntax error, but I just do not know the right way of putting that PHP function INSIDE the Javascript . I have tried double brackets, slashes, etc but to no avail. Trial and error will not work here :-) can anyone help me by indicating the right way to do so ?
  7. Thanks you very much for the quick reply, however, I am affraid the function for some reason does not work well. The result of the source code remains the same, somehow It can not find the pattern...
  8. Hello people (And regex gurus)! I am working on some project now, and I have a problem which needs regex, I really need some help .. Right now, WP is printing this source : <!--Start krembo99 horiz navigation bar--> <ul id="menu" class="sf-menu"> <li class="cat-item cat-item-6"><a href="http://www.xxxx.org/wp/?cat=6" title="blabla">Buzziiii</a></li> <li class="cat-item cat-item-7"><a href="http://www.xxxx.org/wp/?cat=7" title="blabla">Competitionsornot</a> <ul class='children'> <li class="cat-item cat-item-14"><a href="http://www.xxxx.org/wp/?cat=14" title="blabla">tesdrtf</a></li> <li class="cat-item cat-item-13"><a href="http://www.xxxxxx.org/wp/?cat=13" title="blabla">tesr566</a></li></ul></li> <li class="cat-item cat-item-8"><a href="http://www.xxxxxx.org/wp/?cat=8" title="blabla">Events</a> </li> <li class="cat-item cat-item-11"><a href="http://www.xxxxxx.org/wp/?cat=11" title="Vblabla">Featured Articles</a> </li> <li class="cat-item cat-item-1"><a href="http://www.xxxxxx.org/wp/?cat=1" title="blabla">Uncategorized</a> </li> </ul> <!--End pages navigation--> I need to clean the class attribute (just wipe it off) which means intead of (for example) <li class="cat-item cat-item-8"> I need just empty <li> or <li="myclass"> the first option is better.... I tried to use : <ul id="menu" class="sf-menu"><?php $cool_cats = wp_list_categories('orderby=name&show_count=0&title_li='); $cool_cats = preg_replace('/\<li class\="(.*?)\"/','',$cool_cats); echo $cool_cats; ?> </ul> but it does not seem to work. Or better put, I just do not have an idea of how to use it ... I know for you regex gods this looks increadibly easy, but for me it is like a foreign language (although I develop php apps and plugins also ..but I am mainly css and wp person, some PHP , but not regex ...
  9. Hi All.. Since this can be achived both with AJAX, JAVASCRIPT, CSS and more, I did not know where to post this . I need to achive something like this : http://www.neilmeredith.com/dynamicuc/ and then pass it to a PHP mailer. any ideas how it can be achived ? I made a small try with CSSand javascript. but it is quite unstable and when I add fields it is not always duplicating them.. Any help would be greatly appreciated ..
  10. Running some third party script , I am getting this error messege : Warning: preg_match() [function.preg-match]: Compilation failed: internal error: overran compiling workspace at offset 6021 I need some help figuring out what is wrong . I understand that it is invoked by the preg_match() function , and I *ASSUME* that it has something to do with memory handling or cache settings on the server , But have no Idea how to resolve it, or what exactly is this error telling me . Tried to google for "overran compiling workspace" error in google, and search here , but nothing ...
  11. Ok, I have temporarly solved the problem by changing the : define("PLUGINPATH", "/wp-content/plugins/autoblogged/"); to define("PLUGINPATH", "[color=red]m33[/color]/wp-content/plugins/autoblogged/"); but still, how can I change it to something that will AUTODETECT the path ?
  12. Hello all.. I have a problem with grabbing a path to document with a php wordpress plugin. This is the function that requires it: require_once(getenv("DOCUMENT_ROOT").PLUGINPATH.'defaults.php'); And this is the warning : Warning: getadminoptions(/web/htdocs/www.mydomainName.com/home//wp-content/plugins/somepluginname/defaults.php) [function.getadminoptions]: failed to open stream: No such file or directory in /web/htdocs/www.krembo99.com/home/m33/wp-content/plugins/somepluginname/somepluginname.php on line 78 Fatal error: getadminoptions() [function.require]: Failed opening required '/web/htdocs/www.mydomainName.com/home//wp-content/plugins/somepluginname/defaults.php' (include_path='.:/php/lib/php/') in /web/htdocs/www.mydomainName.com/home/m33/wp-content/plugins/somepluginname/somepluginname.php on line 78 note the DOUBLE slashes after "..mydomainName.com/home//wp-content/.." , but the real path is the one indicated below , EG : "..mydomainName.com/home/m33/wp-content/.." So I guess the environmental VAR used [getenv("DOCUMENT_ROOT")] is wrong (because it is not installed at the root but under "m33" but since I am far from being a PHP guru, I do not know which VAR I can use, or HOW to fix this problem. anyone ?
  13. you don't need a CMS.. you need a website fully automatic website builder with integrated index creator and a file searcher :-) Good luck !!! no to the more serious side, like someone already suggested, you need a custome made script for this kind of thing . I do not think any normal cms would do this job for you. but if i am wong, i would be glad to know which one would ...
  14. Yes, It is CMS... But one based on *.asp and not *.php.... My guess is drupal or compatible.
  15. Hello all, I have just installed wordpress on a live server and I now get this message : The uploaded file could not be moved to D:\inetpub\webs\magmalabnet\wordpress/wp-content/uploads. I have read some topics I have found on the wordpress forum, but none gave me a clue. They are also not responding there, so although it would have been the natural place to look for answer, it is useless. My permissions are OK, my files re-uploaded,and the path is saved. the error is strange because it does not state that it is impossiable to load, but impossiable to COPY . The strange thing in the error is the BACKSLASH (note that it gets reveresd..) if i manuelly reverse the backslash, it will reverse it still puts the first one in the wrong direction... the last part of the error is a variable that one put inside config in wordpress : wp-content/uploads. the first is probably generated by the server (unknown) D:\inetpub\webs\magmalabnet\wordpress/ like i said, the problem is probably the slashes, but how can one fix it ?? anyone had a clue on how to solve it? or is it really a part of the problem ?? Is it a problem of the webserver ?
  16. I was wondering the same thing...  ;) now the problem is resolved... I do not know quite why and how. But i have another question. the script was intended to search for the FIRST image in the content item, and instead now it outputs the LAST image. why ?
  17. no, it's not selecting other images... the funny thing is that it was supposed to look at the content items in the table, pick the FIRST image that the content item has, and display it with the link to the item. I even tried to uninstall and re-install again, but to no result :-(
  18. Hi guys you all know joomla/mambo right ? I have a module to enhance the random image module and make the images linked to their content item of origin. [code]<?php /** * @version $Id: mod_randomimagelink.php $ * @package Joomla * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * Joomla! is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ // no direct access defined( '_VALID_MOS' ) or die( 'Restricted access' ); global $mosConfig_offset, $mosConfig_live_site, $mainframe; $moduleclass_sfx    = $params->get( 'moduleclass_sfx' ); $now = date( 'Y-m-d H:i:s', time() + $mosConfig_offset * 60 * 60 ); $access = !$mainframe->getCfg( 'shownoauth' ); $nullDate = $database->getNullDate(); $query = "SELECT * FROM #__content WHERE images != '' ORDER BY RAND() LIMIT 1"; $database->setQuery( $query ); $rows = $database->loadObjectList(); # ONLY ONE ROW $row = $rows[0]; $bs = $mainframe->getBlogSectionCount(); $bc = $mainframe->getBlogCategoryCount(); $gbs = $mainframe->getGlobalBlogSectionCount(); ?> <?php $Itemid = $mainframe->getItemid( $row->id, 0, 0, $bs, $bc, $gbs );       // Blank itemid checker for SEF if ($Itemid == NULL) { $Itemid = ''; } else { $Itemid = '&amp;Itemid='. $Itemid; } $link = sefRelToAbs( 'index.php?option=com_content&amp;task=view&amp;id='. $row->id . $Itemid );   ?> <?php $thumbnail = explode("\n", $row->images); //$thumbnail = explode("|", $thumbnail[1]);     $thumbnail = explode("|", end($thumbnail));     $thumbnail = $thumbnail[0];     ?> <div class="<?php echo "modulediv". $moduleclass_sfx; ?>"> <a href="<?php echo $link; ?>">   <img src="images/stories/<?php echo $thumbnail; ?>" alt="<?php echo $thumbnail; ?>" border='0' /> </a> </div> [/code] Now this code actes strangely. At first when I installed it, it seemed to work just great, but then I have noticed, that for some reason, it keeps cycling between 6 articles I had PRIOR to it's installation, and does not really see new ones I am inserting. I am a quite a complete noobie but I see that here : [code]$link = sefRelToAbs( 'index.php?option=com_content&amp;task=view&amp;id='. $row->id . $Itemid );[/code] The [code]$row->id[/code] is where the module searches for the link itself. Could that ID be the problem when I change articles/modules? can it be done in another way ? anyone has an idea why it could fail ?
  19. Well .... First of all i have to appologize for the late replay, I had some seriouse personal problem, and I could not have replyed before.. Now for your reply : 1) , yes, I have found out by myself that the ALT is not working ONLY in my firefox.... :-) it is working great with explorer ... How did you maake it work with Firefox as well ?? 2) About the URL ... Thanks for the explanation, i thought that a URL like index.php?image=th000001.jpg will only show the image, if it can create any page, and if it is te easiest way, so it is perfect :-) 3) I also thinks that just leaving the URL empty to create a dynamic page and filling it to go to static pages is the best way.... about your new implementations -  how did you did that for Firefox ?? (iv'e already asked that once, I know :-)  ) The categories is a s following : All of the work I am doing, and will do, can be divided to 5-6 categories. 3D , Photography, Architeecture, Photography, Design, Graphics ETC.... I would like to have some kind of a "filter" , with  adrop down menu, or maybe with normal buttons, (it does not matter - I will decide it better) that when chosen, will show ONLY thumbs from that category.... For example, a user could choose to see only Photography works, or only Architecture (or a comination of both) and when choosing that, only those relevant thumbs will be shown. If a user clicks ALL, the page will display all categories. I hope I made myself clear , but even if not - it is not so important - with wht you helped me so far, I am quite happy with what i have up to now..... I really do not know how to thank you for your help,I am usually on the helping side in 3D Forums and i never realised how important it is, and if I will find out how to shoot your KARMA up, i would be happy to do so !!! (that is the only thing I can do to help, unless you need some graphic design or something for your web ..) Thanks again k9
  20. Hi ... Well... the TAG still does not work for me, but I think it is because I use Firefox. in IE it works , and it worked also before. I do not know why my Firefox does not show it, but never mind, it is a minor problem. about the  URL : I see what you mean about the URL like ----  index.php?img=th00000h.jpg --- but then, and I might be wrong here, after one clocks the link, only an image will be opened as the next page. Instead what I wanted is that after I click a thumb, a page will dynamicly (php) created, with the same attributes from the xml, which means caption, description,image, category, and so on.... BUT - some of the thumbs, should not be made dynamicly, but remain static (sometimes HTML,sometimes FLASH sometimes external links to other websites etc...) - so what maybe what i need is to leave the URL in the XML but to do something like this: If the URL is null (i leave the tag empty, or write 0 ) so the page is created dynamiclly, taking the image name, caption etc. If the URL is indicated, so the link will be  a simple link that will go to where it is indicated to go, weather a pdf, external link, or HTML inside the server.. About the category,the system you suggested is great, but how do I make the script know what are the categories ? If you will go to the test page here: [url=http://www.magmalab.net/k99_tk/chromotest/index.php]http://www.magmalab.net/k99_tk/chromotest/index.php [/url] you will see i have put some example thumbs, photo, 3dviz,design,arch. etc. When I click on one of those, I want only the thumbs of THIS category to stay, (maybe with a drop down manu, I did not decided yet) but after all , this is all the same problem i think, how do i seperate te links that has do be dynamically made, from those who just sort, and those who are static ?? Wouldn't it be easier to define categories with another level of xml, like this : <?xml version="1.0" encoding="ISO-8859-1"?> <menu name="work">     <item>     <Photo>   <caption>Arc1</caption>   <Image>Image1.jpg</Image>   <Desc>Description</Desc>   <Thumb>Thumbs.jpg</Thumb>   <url value="1.php"/>     </Photo>     </item>     <item>     <Design>   <caption>Design2</caption>   <Image>Image2.jpg</Image>   <Desc>Description</Desc>   <Thumb>Thumbs.jpg</Thumb>   <url value="2.php"/>     </Design>     </item>   . . . </menu> so the script could just IGNORE the items where this level is present ? (well, after writing it i have realized that it will be just the same to add a <Category>  tag :-) but i still do not know how to sort it, this script is over my capabilities here :-) Well, I really hope I have explained well...  :-\ i am not so sure  :) Thanks again for everything, you have been extremely helpful so far !! Ciao k99
  21. Thanks Man !!! You are a genious!!! I just saw your reply now , THANKS !!!! It works great (gave me an error first, but i got through it) The example is here (only the start, it will have something like 400 thumbs of my works..): [url=http://www.magmalab.net/k99_tk/chromotest/index.php]http://www.magmalab.net/k99_tk/chromotest/index.php[/url] The only thing i changed was the output :         echo '<body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><a href="'.$it['url'].'"><img src="'.$it['Thumb'].'" alt="'.str_repeat('=',$d_ar[$j]['level']-1).$it['Caption'].'" hspace="0" vspace="0" border="0"/>'.'</a>'; (by the way, the ALT is not working, I tried to change it to alt="'.str_repeat('=',$d_ar[$j]['level']-1).$it['Desc'].'", but it did not show. But i know how to fix that ..) So , actually, if i would like to add some feature (like "alt" ) or to take something down , there will be no problem as i understood... But how do i go now to the construction of the single page , that will use the same features ? And is it possiable, FROM THE XML , to establish some trigger, that would say that ONLY for this item, the link is fixed and not dynamic ,and more important - can i , based on the XML again, divide it to categories, so the user can define "now i want only 3d" , " now i want only photography", "now i want only architecture "  etc... THANKS AGAIN MAN !!!!! I can't belive what a fast reply !!
  22. Hello Guys (& girls) I am a 3D guy, the only Connection I have to programming is through Scripting for my 3D APP. and some actionscript for Flash.. I want to re-do my portfolio, and I want to do it in PHP, becasue I appreciate it much and  also I would to learn it. I want the Portfolio to be Super-simple, that is : 1. First Page - only thumbnails (fixed size) , no boarders, frames , or spaces between them. BUT (first problem) - I want it RANDOM on each load. 2. Clicking on an image (thumb) it will go to a next page, where graphics is fixed (always the same), and the only thing that changes is the main image, description, and caption. I know for you PHP wizards it would be easy to do, but i can't seems to get it to work... I have my XML file : <?xml version="1.0" encoding="ISO-8859-1"?> <menu name="work">     <item>         <caption>Arc1</caption> <Image>Image1.jpg</Image> <Desc>Description</Desc> <Thumb>Thumbs.jpg</Thumb>         <url value="1.php"/>     </item>     <item>         <caption>Arc2</caption> <Image>Image2.jpg</Image> <Desc>Description2</Desc> <Thumb>Thumbs2.jpg</Thumb>         <url value="2.php"/>     </Work> . . . </menu> And this is a thing I tried to assemble with copy - paste from some tutorials ( one major here and the others i can't even remember where) <?PHP function print_error() {     global $parser;     die(sprintf("XML Error: %s at line %d",         xml_error_string($xml_get_error_code($parser)),         xml_get_current_line_number($parser)     )); }    //create xml parser object $parser = xml_parser_create(); xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1); //casing xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); //read XML file into $data $data = implode("",file('menu.xml')); //parse XML input $data xml_parse_into_struct($parser,$data,&$d_ar,&$i_ar) or print_error(); //echo '<pre>'; //print_r($d_ar); //print_r($i_ar); //cycle all <item> tags. //$i_ar['item'] contains all pointers to <item> tags for($i=0; $i<count($i_ar['item']); $i++) {     //<item> nested inside another <item>     if($d_ar[$i_ar['item'][$i]]['type']=='open') {         //extract needed information         for($j=$i_ar['item'][$i]; $j<$i_ar['item'][$i+1]; $j++) {             if($d_ar[$j]['tag'] == 'caption') {                 $caption = $d_ar[$j]['value'];             }elseif($d_ar[$j]['tag'] == 'url') {                 $url = $d_ar[$j]['attributes']['value'];             }     }elseif($d_ar[$j]['tag'] == 'Image') {                 $Image = $d_ar[$j]['attributes']['value'];             }   }elseif($d_ar[$j]['tag'] == 'Desc') {                 $Desc = $d_ar[$j]['attributes']['value'];             }   }elseif($d_ar[$j]['tag'] == 'Thumb') {                 $Thumb = $d_ar[$j]['attributes']['value'];             }         }         //output link         echo '<a href="'.$url.'">'.str_repeat('=',$d_ar[$j]['level']-1).$caption.'</a><br>';     } } //unseting XML parser object xml_parser_free($parser); ?> so ... Question is Here : 1.How do I take the data , and turn it into a RANDOM ORDER from my XML ?? 2.How do I create the next page (the one with the description and the main image ?? 3. Actually all the questions should be just this one  "" HHHEEELLPPP " (I am over my head here  ;D )
×
×
  • 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.