So i want to open a URL and regex all the image urls from the page.
then i want to curl all of them and check what size they have. in the end i want to get the biggest one
What does reorder() function do in Joomla?
I have a statement for a function of menu "copy" in administrator code for menu as:
$curr->reorder( 'menutype = '.$this->_db->Quote($curr->menutype).' AND parent = '.(int) $curr->parent );
as i Have executed this code it has reordered my id to any other position.. I just need to know is this reorder() function a inbuilt function of joomla? If yes, WHat and how does it do what he has done it to my ids ? :(
I am Newbie to Joomla PLs help
EDIT
How can i get the the reordered output just after calling the function?
I have a website with a jQuery UI navigation, and I've got ajax working to dynamically change content between html files. I'm basically just replacing the contents of certain div ids with the contents of other div ids.
This still requires numerous HTML files and I was wondering if there was a way to have a single html file and load content into the main page from it instead? What about an xml file?
Thanks for the tips and advice about best practices and possible solutions.
Im trying to reset $i to 0 and print the word margin...is this doable the way im trying to pull it off?
class="customGal'.($i == '2' ? $i = '0' && 'margin' : NULL).'"
Thanks in advance.
I'm sometimes confused to using which one of them,
say i have a function called getmember($id)
function getmember($id)
{
// now this is the confusing part
// how do i test if a $id was set or not set?
//solution 1
if(empty($id))
{
return false;
}
// solution 2
if(isset($id))
{
return false;
}
}
Thats sometimes not clear tome some times if a parameter in a function is set like function($var="")
Then i do
if($var ==="")
{
return false;
}
What should i use the next time isset ? emtyp ? or ===''
I'm using a form where the user can edit an entry. Everything is populating and all is well with the exception that I can't get the drop down to show the project that they've already assigned the image to.
$project_qry = "SELECT * from projects ORDER BY title ASC";
$project_res = mysql_query($project_qry);
$project_drop = "<select name=\"project_id\">\n";
while ($row = mysql_fetch_array($project_res))
{
if ($project_id == $row[title])
{
$project_drop .= "<option value=\"$row[id]\" selected>$row[title]</option>\n";
}
else
{
$project_drop .= "<option value=\"$row[id]\">$row[title]</option>\n";
}
}
$project_drop .= "</select>\n";
I'm sure it's something devilishly simple but I'm stumped.
I have a site which has client side and admin side. There is a table called account History.
which contains fields like uid | accountBalance | PaymentStatus | Date.
Now this table has to be updated every month for all the paid users and the table is bulk. So what is the best way to update the table every month.Do i need to select all the uid's and update.
I'm trying to parse a 6,000 line 500 KB file into an array so I can import the data into our system. The problem is that the script stops executing somewhere between lines 3000-4000. There are no breaks in the code, we use it on other imports. Any ideas on why this might be happening and what I can do to prevent it?
/**
* Takes a seperated value string and makes it an array
* @param $delimiter string The delimiter to be seperated by, usually a comma or tab
* @param $string string The string to seperate
* @return array The resulting array
*/
public function svToArray ($delimiter, $string) {
$x = 0;
$rowList = array();
$splitContent = preg_split("#\n+#", trim($string));
foreach ($splitContent as $key => $value) {
$newData = preg_split("#".$delimiter."#", $value);
if ($x == 0) {
$headerValues = array_values($newData);
} else {
$tempRow = array();
foreach ($newData as $rowColumnKey => $rowColumnValue) {
$tempRow[$headerValues[$rowColumnKey]] = $rowColumnValue;
}
$rowList[] = $tempRow;
}
$x++;
}
return $rowList;
}
I have the following two table scenario:
users
id groups
1 1,2,3
2 2,3
3 1,3
4 3
and
groups
id
1
2
3
How do I return the IDs of all users that belong to group 2 and 1 for example? Should I look into join, a helper group_membership table or function to separate the comma delimited group IDs to get something like this:
group_membership
user_id group_id
1 1
1 2
1 3
2 2
2 3
... ...
I'm using PDO's bindParam.
This is the function which checks every GET variable on the website. After changing it will echo it out:
function Check_Get_Param($val){
$value1=addslashes($val);
$string1=htmlspecialchars($value1);
$string2=strip_tags($string1);
$string3=intval($string2);
return $string3;
}
Hhere this will output the result:
Check_Get_Param($_GET['id']);
Now the idea is any id or id= any or id = %
$_GET['id'] = % will result 0 as % is not integer. How to allow % also?
How do I modify this function or any other function that I could filter the GET parameters so I could keep out the web from injections?
I am using cURL for the first time. I need to login to a site and my code is not working.
help.
i have problem whit setting cookie
curl_setopt($page, CURLOPT_COOKIEJAR, $cookiesPath);
is there any solution to show user all countries and after select country it reselect all cities of its country? be best with script selecting
p.s. russian name of countries
hey guys ,
i have used the popular treemenu plugin for my project ,but the only problem i have is with direction .
as you may see , it shows menus in LTR direction and icons of folder and file floating left side
http://jquery.bassistance.de/treeview/demo/
question is how can i change the directio to rtl
believe me , it takes me one day to play with codes but not worked at last
i asked in jquery forum , but it takes 1 week just to accept my question , let alone answering it
however i know , this may be a lot to ask , but help me , if you have time
I'll try to make myself clear with an example:
Imagine an admin page to add a product to a database (product list). When I open the ADD ITEM page, the item is not yet created (not until I click the submit button), but let's say I want to add categories this product will appear in (with AJAX for example). When I run the AJAX script, i need to tell it which ID (my product) to put these categories in...
How should I do this.?
Is inserting a blank item in the database (to get mysql_insert_id) when the page opens a good way to do this.? Is it prone to conflicts or errors..?
How do you guys do it.?
Hi
how to make our site viewable in top ten of the google search...
I want my website to be available for the user who google with search name social networking or something like ssit How to do that?
We are looking for Web Designers & Developers. Urgent Opening.
Profile:-
a) Have exp. in Designing websites in wordpress
b) Have Creativity in work
c) Send us your work – [email protected]
d) Min Exp. required: 2 + years
e) Can Integrate the Facebook, Twitter & other social networking websites.
To review our profile – please check – www.dicorporation.com & www.ismoip.com
I'm developing a website that uses an Ajax plugin to like/dislike/comments an item. But when there are multiple items on the same page, the page takes too long to be displayed. On google chrome for instance, for 10 items you have to wait something like 10 seconds before you can see anything.
But in Firefox, and IE 8, the other elements of the page are displayed, and only the likes/dislikes take some time. But the advantage is that they are displayed as soon as they are loaded. So this is much better.
So how come Google Chrome is less efficient than Firefox and IE? Is there a trick to display on Chrome the page like in Firefox?
I have attached a Firebut image of the loading page.
http://img59.imageshack.us/img59/9475/scriptj.png
Thanks for your help.
Hi all,
I'm building a website, and i need to know
the actual page address in which the user is in,
in order to take users in the same page after login.
The problem is that every page is generated from
variables passed by url and query string, so I dont't
know how to recover every variable and assign to it the
correct value.
How to recover variables name and assign them
the correct values?
Thanks
lore
(sorry for my English)
I want to synchronize two directories. And I use
file_get_contents($source) === file_get_contents($dest)
to compare two files. Is there any problem to do this?
basically i know what those $_REQUEST, $_POST, and $_GET cause i use apache as my server. But would any body kind enough to explain more about how to use it in real web application today ?
hi all
I'm using a database that contains contacts (fields like name, address, ...). If i'm using in my database a city that contains special chars (like ü) or html codes (like ü), then how can i convert them to u, so when i search for a city that contains that a special char should be shown in the result...
$post_keys = array_keys($_POST);
$special_keys = array();
for($i=0;$i<count($post_keys);$i++){
if(strpos($post_keys[$i], "special") !== false){
$special_keys[] = $post_keys[$i];
}
}
I have numerous post vars with naming conventions such as special0, special0_time, special0_duration, special1, special1_time etc.... What I want to do is to find out how many main groups there are, so special0, special1 etc... The code I currently have searches all key names that have "special" in it, thus retrieving more than I want.