Jump to content

antonyfal

Members
  • Posts

    172
  • Joined

  • Last visited

Everything posted by antonyfal

  1. Ok, im grasping it-- Im getting a clue.. So i can have multiple "?" in the url one for models, one for name(demo), one for uid(1) or will the 1 already be included in the viewprofile? as per example.. So all i basically have to do i think is just make the url like your example--- i neednt do the whole .htaccess thing.. I just have to change the url to shift and have the options "?" in it.. its easy... then the html will pickit up in the index.html page.. I think i get it now.. I may have a small trial and error problem comming my way adding the extra "name" and "models" to the html you gave me... But im sure i can look it up somewhere.. When i get it working or if i have further issues ill post it.. Thanks a stack.. Tony
  2. i see what you getting at!! but i need a proper example: my site user will send/share the link below via email. the link on its own opens in a webpage on its own at the moment.., but there is plenty of things on that page i dont want to include with the share link.. // demo is the profile owners name, and 1 is the profile uid.. This url can be in a email attachment, or on a facebook wall or wherever.. https://www.xxxxxxxx.com/models/viewprofile/demo/1.html // i need this url to open/target in the mainframe located on the index.html page, I don't want the url to open on its own page.. How can i do that with the example you gave me? please if you or anyone knows this is quite important and my last step to complete my site.. Best regards Tony
  3. Hi requinix Can you show me an example? or a way to go about it, or where to find an example.. If i can sort this out i can launch my mobile site:D.. I understand the control i have over the link.. just how to get it to open in the index.html iframe "mainframe".. i would think it should be a simple solution, but all the examples i have found are slightly off what i need and cant be customized.. what should the URL look like!? if i know that at least then i can figure it out (maybe)... It must be a share type link to the profiles page, which will open on the index.html page in the Iframe.. Regards and thanks for the effort this far.. Tony
  4. Hi thanks for this, What if i don't know the url? like for example in my site a user can share their profile with EG: facebook friends.. a link/url is passed to the facebook wall to be shared.. When that link is pressed, it must then open the profile owners page within an iframe "mainframe" on the index.html page.. // the links will always be different.. Is there a way to do this? on a html page?
  5. Hi, Maybe ii asked it in the wrong way--- i have a webpage html format index.html with an iframe name ="mainframe" is there a way to have a url/link open another url webpage in the mainframe on the index.html page? example url to open: something like.. http://www.xxxxxxxxxx.com/thisurl/in this iframe/on this page/....... //thisurl= the url to open in the frame and is on the same server as the iframe index.html page //in this frame= the frames name //on this page will be the index.html page I have no clue, and if it is possible? would i have to specify the iframes styling too? this is quite urgent if anyone can give an example/explanation would be much appreciated.. regards Tony
  6. Hi, thanks for the reply.. I haven't had the chance to test this yet-- does the "trim" remove the blank space/s? i think the sort will work.. Best regards antony
  7. Hi i have a drop-down list this little piece is where i explode the comma deliminated words into an array.. everything works but i cant find a function to do the sort order of the value options? and also i get a blank space everytime.. as option and value? <optgroup label=\"Others added\">"; $profile_languagegeneralrep = str_replace(', ', ',',$profile_languagegeneral); $langwording = explode(',', $profile_languagegeneralrep); $langwording = array_unique($langwording); foreach($langwording as $langexi) $languageLists .= "<option value=\"".$langexi.','."\">".$langexi."</option>"; $languageLists .= "</optgroup>"; } $languageLists.="</select>"; $output['LANGUAGELISTS']=$languageLists;
  8. heres my full code: // at the moment i only have a search by age function, but i would like to change it to a search by age range function.. How can i add the $min and $max to this query below? // note: i also have a class file and a html output page.. Im thinking i would need to get the mindropdown and max dropdown into this query?.. Please somebody assist me with this code.. rgs. my current call to get dropdownlist values: if (in_array("age",$searchOptions)&& $showSearchOptions ) { if (empty($sch->filter['age']) ) $selectOption=$output['LANGUAGE_SEARCH_AGE']; else $selectOption=$sch->filter['age']; $showButton=true; $query = "SELECT DISTINCT profile_age FROM #__sites_profiles WHERE published = '1' ORDER BY profile_age ASC"; $ageals=doSelectSql($query); $agedropDownList ="<select class=\"inputbox\" name=\"age\">"; $agedropDownList .= "<option value=\"\">All</option>"; foreach ($ageals as $ageal) { $selected=""; $profile_age=$ageal->profile_age; $agedropDownList .= "<option ".$selected." value=\"".$profile_age."\">".$profile_age."</option>"; } $agedropDownList.="</select>"; $output['AGE']=$agedropDownList; } and here is my class file search function: function sitesSearch_age() { $filter=$this->filter['age']; $this->makeOrs(); $profile_ors=$this->ors; if(!empty($filter) && $profile_ors ) { $keywords= mysql_real_escape_string($filter); $ageals = explode( ' ', $keywords ); $wheres = array(); foreach ($ageals as $age) { $wheres2[] = "LOWER(profile_age) LIKE '%$age%'"; $wheres[] = implode( ' OR ', $wheres2 ); } $where = '(' . implode( ($phrase == 'all' ? ') AND (' : ') OR ('), $wheres ) . ')'; $query="SELECT profiles_uid FROM #__sites_profiles "; $query.=" WHERE ( $where ) "; $query.=" $profile_ors AND published = '1' "; $this->resultBucket=doSelectSql($query); } else $this->resultBucket=array(); $this->sortResult(); }
  9. Im trying to create an age range search for my site, from one age column-- heres start of my query, and then im stuck with the html side: // i have already setup the min and max from a mysql fetch from the same column "age" $min=$dropdownlistmin $max=$dropdownlistmax SELECT age FROM profile_age WHERE age >= $min AND age <= $max; // and now what do i do next? any help please. Thanks.
  10. Thanks, But not quite working: without all the fuss, the hidden input adds the tmpl=component to the url already-- so that i get search.html page without the rest of the index.php page.. What im trying to do is to let the search page determin weather it is called by the Iframe or not-- If its called by the iframe the url will have tmpl=component in it and it is neccesary to continue this url with the tmpl=component in it and the hidden input must be displayed-- if there is no tmpl=component in the url, then the search.html page must not load the hidden input.. So the link in the iframe == www.xxxxx.com/xxxx/xxxxx/xxxxx/search.html/?tmpl=component // so now the page know's its in an iframe and will continue to load the hidden input.. if no tmpl=component then the hidden input should not load.. The fix you gave me loaded the hidden input on both urls.. is it maybe missing something?
  11. I been going about it the wrong way.. the search page is accessed in two ways using 2 different urls: // this loads the search with all the mainsites pages main url: www.xxxx.com/xxx/xxxx/xxxx/search.html then in a iframe like this: //this loads only the search page without the rest of the main page http:///www.xxx.com/xxx/xxx/xxx/search.html?tmpl=component i use this in the iframe on the main page. I need to add the following script to the search page to determin if the "tmpl=component" is in the url, if it is!? then it must continue to load it-- with this hidden input: <input type="hidden" name="tmpl" value="component"/> // but my snippets not working.. i dont need the parent url, only the current iframe url heres my code: </head> <body> <?php $url = $_SERVER['REQUEST_URI']; echo $url; $parts = explode("=", $url); If ($parts==component){ <input type="hidden" name="tmpl" value="component"/> }else{echo "";} ?> </body> </html>
  12. I been going about it the wrong way.. the search page is accessed in two ways using 2 different urls: // this loads the search with all the mainsites pages main url: www.xxxx.com/xxx/xxxx/xxxx/search.html then in a iframe like this: //this loads only the search page without the rest of the main page http:///www.xxx.com/xxx/xxx/xxx/search.html?tmpl=component i use this in the iframe on the main page. I need to add the following script to the search page to determin if the "tmpl=component" is in the url, if it is!? then it must continue to load it-- with this hidden input: <input type="hidden" name="tmpl" value="component"/> // but my snippets not working.. i dont need the parent url, only the current iframe url heres my code: </head> <body> <?php $url = $_SERVER['REQUEST_URI']; echo $url; $parts = explode("=", $url); If ($parts==component){ <input type="hidden" name="tmpl" value="component"/> }else{echo "";} ?> </body> </html>
  13. Thanks. What you are saying makes sense. Do you know of any place to look for a snippet or a resolution to this "what i thought would be easy" problem? I tried several javascript snippets but no luck-- it was also surprising to see how many people also had this problem.. If i find a solution ill post it here.. if anyone else has a solution this would also be gr8. Regards Tony
  14. Im battling a bit here: I got a main page html with an iframe "mainframe".. Inside the mainframe i have portaed another script from my server... This script has its own url within the iframe.. What i need to to is get the parent url explode the url and see if any parts are ==tmpl=component, then if success the iframe page loads a hidden input <input type="hidden" name="tmpl" value="component"/> else "" What problems im having: the site works on both in the iframe and on its own normally.. //this code is on the search.html the page loaded within the iframe-- i need to get the parent url, and see if it contains "tmpl=component" then if it does loads the hidden input.. note: the search page is also called from the normal index.php page and is then not in an iframe-- <?php $parenturl = $_SERVER['REQUEST_URI']; $parts = explode("?", $parenturl); If ($parts=='tmpl=component'){ <input type="hidden" name="tmpl" value="component"/> } ?>
  15. Solved it: so stupid!! the $myurls is already echoed in the html.. its the little things that make the big difference... heres the fix!! $currenturl = $_SERVER['REQUEST_URI']; $newurl = explode("/", $currenturl); $url2 = $_SERVER['HTTP_HOST']; $myurls = 'http://'.$url2.'/'.$newurl[1].'/'.viewprofile.'/'.$profile_name.'/'.$profile_id.'.'.html; // here the html is already echoed.. so was not neccessary to put the php or the echo!! Thanks for the help.. echo '<br/> <!-- AddThis Button BEGIN --> <script type="text/javascript">addthis_pub = \'davidp13\';</script> <a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, \'\', \''.$myurls.'\', \'[TITLE]\')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s9.addthis.com/button1-addthis.gif" width="125" height="16" border="0" alt="" /></a><script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script> <!-- AddThis Button END --> '; }
  16. Hi, getting the title proved too much work.. The title is also the $profile_name, so as i had the code to get the current profile name, i used that to build the SEF URL.. as i see it it should work... the title is called from the addthis sharing .js file... but my java is useless, so to try to fit that into the new url is weeks of work for me... The echo didnt work by the way, the reason being the original is an output from the javascript. Pikachue was correct i got to move this question to the javascript forum.. If you would like a crack at it i can post the javascript here or msg you? Thanks for the reply. Antony
  17. Hi i have found a work around to this problem above: how can i get the php to echo the url in the javascript? the php is not echoing the newly created url!? am i missiing something here please help if you can.. regards <?php $currenturl = $_SERVER['REQUEST_URI']; $newurl = explode("/", $url); $url2 = $_SERVER['HTTP_HOST']; $myurls = 'http://'.$url2.'/'.$newurl[1].'/'.viewprofile.'/'.$profile_name.'/'.$profile_id.'.'.html; echo '<br/> <!-- AddThis Button BEGIN --> <script type="text/javascript">addthis_pub = \'davidp13\';</script> <a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, \'\', \'<?php echo $myurl;\?>', \'[TITLE]\')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s9.addthis.com/button1-addthis.gif" width="125" height="16" border="0" alt="" /></a><script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script> <!-- AddThis Button END --> ?>
  18. Hi Pikachu, I see why you moved this to Javascript.. But i think it is a mix problem-- I can get the from php and echo it into the place of the above , I more hurst on php then javascript... Is there no function to pull the page title in php? and by the way this moved itself back to the php forum... i think?
  19. Hi, As i see it this should be an easy one.. Im using the addthis shareing script to share a page url on multiple platforms... My problem is that i have sef urls and also a seperate fast search page where profiles are called up via search. These profiles are called in an iframe and the url is then notadd sef any longer but the standard url... What i need to do is build the sef url from the server request uri and then add the page title which is also the profiles name to the new url--- i can do everything to build the url, but i do not know how to pull the page title? one thing to note is that the page being shared is in an Iframe, i dont think this is a big problem as the script to share is also on the page which appears in the iframe.. here is the addthis shareing script which calls to the url: <!-- AddThis Button BEGIN --> <script type="text/javascript">addthis_pub = \'davidp13\';</script> <a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, \'\', \'\', \'[TITLE]\')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s9.addthis.com/button1-addthis.gif" width="125" height="16" border="0" alt="" /></a><script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script> <!-- AddThis Button END --> '; } here is an example of the url and the result i need for the sef url equivalent: current link no sef http://www.xxxxxxxxx.com/subfolder/index2.php?option=xxxxxx&Itemid=1&task=viewprofile&profileid=1 Sef result needed to fill the above: http://www.xxxxxx.com/subfolder/viewprofile/profilesownersname/1.html the "1" is the profile owners profile id i can pull this from the url above, the viewprofile is a standard word in the url, but the profile owners name is by default also the PAGETITLE. which doesn't show in the non sef link.. any ideas how to pull the pagetitle and add it to the new url before it is passed? best regards Antony
  20. thanks for the help-- The long names comes from the search and replace function in my editor-- I have many dropdown lists to make, for regform, admin area, search and edits-- I know you right about later editing... Thanksa stack Zurev.
  21. im guessing this is not an easy one to solve am i correct in useing the array_unique function? i know im useing it incorrectly, i have no results, but is it the correct function to use here? for the exploded words? please assist me here. Regards Antony
  22. Hi, i got help earlier with the this code-- exploding a field and getting an array, then inserting the array into a multiselect box-- That part is easy and works fine. Now the explode function gives an array of words with duplicate words in it: I tried several ways most either give a blank option/value, or the array word.. here is the code: $query = "SELECT DISTINCT property_functionsexperience FROM #__users_profiles WHERE published = '1' ORDER BY property_functionsexperience ASC"; $functionsexperiencelistgeneral=doSelectSql($query); foreach($functionsexperiencelistgeneral as $words) $property_funcexperilist=$words->property_functionsexperience; $wording = explode(', ', $property_funcexperilist); foreach($wording as $funciex) $funcexi=array_unique($funciex); $funcexpList .= "<option value=\"".$funcexi.','."\">".$funcexi."</option>"; $funcexpList .= "</optgroup>"; } $funcexpList.="</select>"; $output['FUNCEXPLIST']=$funcexpList; this code is adapted slightly from the working original that gives the double words-- this code gives a blank, but i think its on the correct track!?
  23. SORRY YOU WERE CORRECT! i only added the commas to the options array after i already saved the first test to the database. So i was explodeing the data at an invisible "comma" its working perfectly now-- thanks for the assistance.. I did however remove the "$funcexpList .= "" from the code you gave me-- it worked either way. regards Antony
  24. ahh sory here is where it is defined: $query = "SELECT DISTINCT profile_functionsexperience FROM #__functions_experience WHERE published = '1' ORDER BY profile_functionsexperience ASC"; $allwordsgeneral=doSelectSql($query); foreach ($allwordsgeneral as $allwordsalsgeneral) { $profile_allwordsgeneral=$allwordsalsgeneral->profile_functionsexperience; }
×
×
  • 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.