Closed (fixed)
Project:
Custom Contextual Links
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
29 Nov 2011 at 06:14 UTC
Updated:
14 Jan 2012 at 23:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
circuscowboy commentedHere is the patch off the latest dev.
Just before I uploaded I realized that if someone didn't have views installed it might break. I don't know why someone wouldn't have views installed but I will look into creating a couple of conditions and up another patch soon.
Comment #2
bkoether commentedHi circuscowboy,
thanks for providing this patch. I will give it a test spin tomorrow.
Comment #3
bkoether commentedActually... thinking of this, it makes me wonder if it would be better to have your patch created as a submodule that has Views as a dependency.
I know that there are not a lot of sites that will not use views... but in order to avoid implementing a large number of double checks if the module exists, this might be a cleaner implementation.
I will put some more thought into this tomorrow.
Comment #4
circuscowboy commentedI was thinking of that. It would probably mean some changes in the module to make it more of an api and then it would be easier to add support to views - panels - and what ever else uses contextual links. Even blocks could be separated as some people might disable blocks.
I was thinking that the table could be re factored to combine ct nid block and now view into a generic column that could be used for all link types. That way when things expand more the table doesn't go out of control.
Comment #5
bkoether commentedDefinitely have to give this some thought... I guess I assumed the block module would always be there but you are right, this is a missing dependency that could lead to issues.
Comment #6
circuscowboy commentedI am hoping to spend a little time on this weekend - If you have done any thinking or doing, let me know. I don't want to repeat the effort.
Comment #7
bkoether commentedI decided to separate out the block functionality into a submodule and hope to have this up by then end of Friday. This should give a good template on how other submodules need to be structured in order to add functionality. I also revisited the DB table as you suggested and made it more generic.
Now the question is if you would like to create your own submodule based on these changes or if you want me to incorporate your patches into the CCL package as a submodule. I'm cool either way.
Really appreciate your work on this and your interest in helping making CCL a really useful module.
Comment #8
circuscowboy commentedI have been itching to get some time to make patches and help out. I will gladly rework the ccl_views module. Now that I spent the time to understand all of you code it will go smoothly. I learned a lot going through the code. I think that your implementation of caching is great and will save on a great deal of queries. Making the module extendable will give it a much easier expansion path.
Excited to see the new code tomorrow.
Comment #9
bkoether commentedHey circuscowboy,
I just committed the latest version and the dev snapshot should be available pretty soon.
This new release has the block features broken out into a submodule. So CCL core only supports nodes.
If you follow the example in the new ccl_blocks modules you should be able to quickly adjust the work you have done so far for the views support.
I want to hold off on releasing 7.x-1.1 until you had a chance to test the current dev snapshot and finish your work for the views support.
Comment #10
circuscowboy commentedI have just started getting things going but here is an important patch for the ccl.install.
Your updates hooks work great but if you are not upgrading the schema is the old schema.
I will include this in my final patch as well if you want to wait.
Comment #11
bkoether commentedDarn... I knew I fortgot something!
Thanks for catching that. Will apply that patch tonight.
Comment #12
circuscowboy commentedHere is the complete patch.
I don't know how or if a patch can make a new folder for the 2 new files are not in a folder.
I had to make one tweak to ccl.admin.inc to make things work.
There had to be a test to see if the link info was created or else the next module would just over write it with ""
I have tested out the basics but will test it out more tonight. Things seem to be working as they were before.
Comment #13
bkoether commentedThanks Scott,
I will merge it all together tonight.
Comment #14
bkoether commentedI merged your changes into the dev branch. Didn't really had time to test it a lot but I only got the "All views" option to work. The other two wouldn't display any links.
My weekend is pretty much booked up but I will have some time off next week to work more on it.
Comment #15
circuscowboy commentedYes there were errors in the write to cache
here is a patch for the ccl_views,module
It has to be used inside the ccl_views folder.
Comment #16
bkoether commentedNow available in 7.x-1.1.