Hello,
What is the php code that I need to write to display the last 5 blog posts from each category on my wordpress blog?
I only want to include the title of the blog post, date and name of author (no image from blog post).
An example of exactly what I want to do is in this theme, under the name 'LATEST POSTS IN XXXXX CATEGORY'
http...
I there a way to update data into mysql database when click on a link? I want create a comment voting system on my site so when user clicks on a "Vote for this comment" link, +1 should be sent into database...
How is that possible?
...
I have seen a avatar generator which makes monster creators, but I saw this a few years ago and now can't remember the name or find it with Google. Does anyone have a url?
...
Hi guys I'm building a simple mail interface for my application but I've noticed that its really slow especially when the user has to list out a number of emails. I've traced the time taken for code to execute and found that just the $mail->getMessage function takes around 0.6 seconds to execute.
My code is as below:
$mail = new Zend_M...
Hi,
Is there somewhere a repository/list of third party ZF plugins?
I mean plugins like this one: http://code.google.com/p/zfdebug/
Thank you. :)
...
Is it possible to somehow use PHP to read the contents of a .pst file?
...
Hi guys,
Well through jquery i am doing an ajax request to send through a cell number in the format of +1234567 but if i access it on the other end using $_POST['cell']; the plus is gone, where could it be?
...
Hi guys, I have some pages set up so that they respond only to ajax requests. The thing is that how can I set it up so that if someone tries to send the requests via a browser window i.e by typing them out - they don't run and that they run only when an ajax call is made. The pages are in php here
...
There's a couple other questions on this same topic on here that I've read, but mine is slightly different. I'm trying to do a very basic mod_rewrite:
RewriteEngine on
RewriteRule ^go/([^/\.]+)/?$ /go.php?page=$1
go.php looks like this:
<?php
ini_set('display_errors',1);
if(isset($_GET['page'])){
echo 'page='.$_GET['page'];
}els...
hi there,
I am using this: if(!preg_match('/^+[0-9]$/', '+1234567'))
and am getting:
Warning: preg_match()
[function.preg-match]: Compilation
failed: nothing to repeat at offset 1
any ideas why?
update: Now using this: if(!preg_match('/^\+[0-9]$/', '+1234567'))
and am getting no match.
any ideas why?
...
I use the following function to check whether the viewed post is in a descendant category of the given ID.
How can i extend the function to also check if the current viewed "custom post type" is in a descendant category of the given ID?
I use this function to set a menu item to "active".
The function is:
/**
* Tests if any of a pos...
I want let user to upload images to server add some info (like description, tags) about each image.I use Uploadify to upload multiple images.
I wonder if it is possible to show thumbnails of the images (while the user enters the additional info about each image) before the images are actually uploaded to the server.
I want user to have...
Hi all,
I've just installed LAMP on my Ubuntu 9.10 machine, and everything works fine except when I copy my PHP files from another computer.
The LAMP guides I've followed also made me create a phpinfo() test file, which works, but when I try to type in e.g. index.php absolutely nothing happens - just a blank page in FireFox. :(
The fi...
I would like to display a ticker on each page what scrolls some of the latest datas in it. I think to put in the layout file would be more simply if I can read the model data from the layout.
Is it possible?
Or does layout code has access to the variables generated by a controller and passed to a view?
Or is it the only way to make an ...
Hello,
I'm looking on how to implement auto login with my website using facebook connect,
currently its working fine, but user have to click connect every time they come to my site.
and is it possible to make it they logout in facebook too if they log out from my website, vice versa?
Thank you for any advice and help.
...
Hi there,
if on a page i have
echo $_SESSION['user_id'];
and it echo's 1
can i access that value on a page called using ajax (on the same server & domain)
or do i need to pass that value through with the ajax request?
...
Hello!
I'm trying to transform this:
http://link_brochure/1/2 OR link_brochure/1/2
into this:
class="show-brochure" href="http://localhost/main/brochure/1/2"
But I'm a rookie when it comes about regular expressions... Any ideas?
Thanks!
...
Hi there,
i have a table and one of the columns is co_com
this is communication preferences
there are three options (and only ever will be)
i dont want to have a seperate column for these values
so i was thinking of storing them as
sms/email/fax
sms = yes
email = no
fax = yes
which would be stored as: 101
but,
im thinking thats no...
I'm having some trouble sending $_FILES by cURL - the files get transferred alright using the following code, however it is impossible for me to get the name, and type of the file, in fact once the $_FILES reach their destination their type is stored as "application/octet-stream" - what am I doing wrong!?
$count=count($_FILES['thefile...
Warning: I don't have much experience with CodeIgniter and I am updating a site originally create by another developer.
For some reason the CodeIgniter image class is creating thumbnails with a black pixel in the top left corner. Here is an example:
This only seems to happen in production (this site is being hosted on a super lame s...