Okay, so I just couldn't leave this alone :)
I implemented the following, which works and even brings in the
'contain' info. However there is still a small problem...
// books_controller.php view()
$similar = $this-Book-similar_books($genre_id, $limit);
// model book.php
$similarBooks =
, 2009 at 4:48 AM, Mike Cook m...@epubbooks.com wrote:
brian, when I try this though I get an Unknown column
'Book.genre_id' in 'where clause' error.
SELECT `Book`.`id`, `Book`.`title`, `Book`.`slug`, `Language`.`id`,
`Language`.`name` FROM `books` AS `Book` LEFT JOIN `languages
'
)
)
)
)
);
}
On Sun, Apr 12, 2009 at 8:25 AM, Mike Cook m...@epubbooks.com wrote:
Okay, so after more searching around I found a post by pkclarke who
makes use of a search
= $this-Book-similar($genre_id);
I was also pleasantly surprised that I could pass the $id array to
'conditions' and it would use it as an 'OR' :)
Thanks for your help Joe, your comments really helped to point on the
right path.
Mike
On Apr 11, 8:45 pm, Mike Cook m...@epubbooks.com wrote:
Hi Joe
Indeed you can't distribute any copies of the book's contents
(regarding other comments in this thread) which prevents (~immediately
outdated) copies of the book springing up and being found by the
nubies.
...as the file on my is already outdated I should take your comments
as an indication
In my books view.ctp, I want to have a list of 5 books that are
related via the genres data, which has a HABTM relationship. Although
I can do this by placing a function similar() in the
genres_controller, I have to call it from the view with requestAction.
// genres_controller.php
function
pm, Mike Cook m...@epubbooks.com wrote:
In my books view.ctp, I want to have a list of 5 books that are
related via the genres data, which has a HABTM relationship. Although
I can do this by placing a function similar() in the
genres_controller, I have to call it from the view
psykro, no offence taken :)
The reason I made mine in EPUB was because that works nicely on my
Sony Reader. It isn't meant as a reference manual, but something I
just browse through while on the train to work -- yeah I know, while
most people are reading Terry Pratchett or something of the like,
Hi psykro,
I'm not sure if something like what I created would be of interest to
anyone but
Back in January I created a version for myself so I could read it on
my SonyReader. It is in the EPUB format so you will need a reader than
can view these files such as Adobe Digital Editions. This
FYI
The latest CakePHP release (1.2.2.8120) fixes the problems I was
having, now $paginator-link() can used to get the desired results. On
my initial check, everything seems to be working perfect.
Many thanks to the developers!
Mike
On Feb 27, 11:11 pm, Mike Cook m...@epubbooks.com wrote
:
The fix changed the behavior for all simple (single-model) paginations
so that they now require the modelname in sort() to work. I suspect
this was not intended?
http://groups.google.com/group/cake-php/browse_thread/thread/00fc597c...
On Mar 22, 1:51 pm, Mike Cook m...@epubbooks.com wrote
I'm looking to implement a similar posts feature on my site where in
the sidebar, each post entry shows a random list of 5 'related' posts.
As I'm still new to Cake I'm not sure if this is best with an Element
or as a Helper. However, looking at the manual it seems that we can
pass variables to
Hi Dave,
I've just started looking into this myself. You could try these links;
http://www.assembla.com/wiki/show/searchable_behavior
http://thechaw.com/cakebook/source/plugins/searchable
http://bakery.cakephp.org/articles/view/search-feature-to-cakephp-blog-example
error.
On Wed, Feb 25, 2009 at 5:49 PM, Mike Cook m...@epubbooks.com wrote:
I am unable to get the Media View to force the download to start, no
error is given other than it just lands on a blank page. Here's the
download function in my controller;
function download ($id = null
I've been using HTML-Kit for ever!! I have to say though, over this
last year it's started to show its age (2002) but still, for quick
XHTML/CSS design, it works a treat.
Recently I changed over to Eclipse PDT, so far I'm very impressed,
although like others have said, the code completion isn't
', array('sort'='released',
'direction'='desc');
to
echo $html-link('Recent', array('sort' = 'released', 'direction' =
'desc'));
-- Mike
On Feb 15, 11:49 am, Mike Cook m...@epubbooks.com wrote:
I had posted about this previously but I guess the title and
explanation I used were not very good
I am unable to get the Media View to force the download to start, no
error is given other than it just lands on a blank page. Here's the
download function in my controller;
function download ($id = null) {
list($file_name, $file_ext) = split('[.]', $id);
$this-view = 'Media';
Okay, definitely some food for thought here.
@Miles J :: As brian states, this would be for stats. It's okay
knowing you have 10 downloads, but knowing the time, day, week, and
month can help in understanding your visitors better. If I do get to
the point of implementing an API then I should
On Feb 17, 3:23 pm, Samuel DeVore sdev...@gmail.com wrote:
Of course if all you want is stats on the file downloads and your
server does that anyway, why not just filter/ collect stats from the
log files?
Sam D
Even if I don't initially start out recording other data, it's
probably worth me
I want to track the number of file downloads and I'm wondering if any
here have thoughts on how best to do this.
At the moment I have a separate Files table for the details that
stores information such as; filename, filesize, version,
first_downloaded and downloads.
Is incrementing the
There's never guarantees of having huge traffic but I do expect to get
a considerable amount, the number of files available will also grow to
several thousand within a year or so - there's certainly potential of
having tens of thousands of downloads per month.
This actually makes me wonder if I
I had posted about this previously but I guess the title and
explanation I used were not very good. Hopefully this will be better.
Here is my code;
// Controller
function index() {
$this-paginate['Book'] = array(
'contain' = array('Author', 'Language', 'Genre'),
'order' =
I've been having some trouble with the paginator when using a
different sort order on two links.
'Title' needs to default to ASC, which Cake does.
'Date' needs to default to DESC, by default it doesn't but using
$paginator-link it works;
$paginator-link('Date', array('sort' = 'date',
. If it is ordered by another field, order by this field
and default to ASC direction.
On Feb 4, 1:08 am, Mike Cook m...@epubbooks.com wrote:
I'm rather new to cake and I'm having trouble understanding how to
have a simple sort on a title field using the pagenator.
All I need is two links, one
I'm rather new to cake and I'm having trouble understanding how to
have a simple sort on a title field using the pagenator.
All I need is two links, one ascending and the other descending --
Title (ASC) | Title (DESC)
At first I thought I could just set sort/direction, but perhaps doing
this
25 matches
Mail list logo