Drupal Custom pager and Display suite

When enabling a Display Suite layout the your custom pagers will disappear
This can easily be resolved using a node display custom field.
The custom field feature is great and allows for very powerful stuff and it lets you get around most issues.

Ill provide the solution first and explain later as this can be used to bring in content from other custom modules that add content to the node.

The solution

Get the pager details:
1. Go to Home › Site building › Custom pagers (admin/build/custom_pagers)
2. Edit the custom pager and make note of the ID its in the URL admin/build/custom_pagers/edit/1 (pager id = 1)
3. set the pager position to Above the Node body (you will be able to position it using Display Suite wherever you want)
4. Hit the submit to save changes

Add the Node display field
1) Go to Home › Site building › Display suite › Node displays (admin/build/ds/nd/fields )
2) Expend the “Add new code field”
3) Giver it a key and title. Make those specific to the pager so something like custom_gallery_pager and custom gallery pager
4) Set the content type the field is relevant to in the “Field exclude” section. you must check all types exept the one you are interested in (reverse logic)
5) And finely add the “Field code”
content['custom_pager_top'][1]["#value"]; ?>
Replace [1] with the relevant pager id you (Get the pager details stage 2) and Save

You an now use your field in your DS layout (:

Analysis

Modules that add content to a node would usually add it in the nodeapi to the node content so the first place to look is the node api of the module.
Below is an extract

function custom_pagers_nodeapi(&$node, $op, $teaser, $page) {
switch ($op) {
case 'view':
// We want to make sure we don't try to output when print.module is active.
// It's a bit of special casing but it doesn't do much harm.
if ($teaser == FALSE && empty($node->printing)) {
......................
switch ($pager->position) {
case 'top':
$node->content['custom_pager_top'][$pager->pid] = array('#value' => theme('custom_pager', $nav_array, $node, $pager, 'top'));
break;
case 'bottom':

its easy to see how the code adds the content. It does this by creating a new array element according to the $pager->position.
In the case of ‘top’ this is:
$node->content['custom_pager_top'][$pager->pid] = array('#value' => theme('custom_pager', $nav_array, $node, $pager, 'top'));
so the ‘#value’ will hold the actual pager giving us (for pager id 1):
$node->content['custom_pager_top'][1]["#value"]
when using node display fields you must replace the $node variable with $object so the filed code is
content['custom_pager_top'][1]["#value"]; ?>

Leave a Comment November 9, 2010

Why use a Web Content Management System (WCMS) for designing of websites

Although we have built many solutions for our clients from the ground up, we increasingly base our solutions on standard web content management systems (WCMS) such as WordPress (for simple sites and blogs) and Drupal (for more complex and tailored solutions).
WCMS frameworks such as Drupal enable us to build custom solutions based on a solid framework. This means that we can develop rich web site solutions rapidly without our clients having to pay for us to reinvent the wheel. WCMS solutions also provide the client with full editorial control over the implemented web site freeing them from being tied to a proprietary solution.
From simple blogs to rich social publishing and e‐commerce sites, Drupal is a powerful framework that provides extensive opportunities for web development. Our experience with these systems enables us to provide open and transparent solutions that are highly visible to search engines and integrate readily with Social Marketing systems.

WCMS such as Drupal provide a framework for a web site with publishing of content, user registration and authentication built in to the core. In addition they are highly extensible with a rich variety of additional facilities freely available as modular extensions that enable you to extend the functionality of your site almost without limit and at any stage in the development of your site.
Drupal is an open source and free system that has a large global user and developer base. As a result it is robust and continually improving in terms of its security, performance and facilities available to extend its core functionality.

“The community that your organization serves wants to interact ‐ with each other, and with you. Your organization can nurture and grow with this community if you can provide the infrastructure. Two things need to be combined in this infrastructure: a WCMS with Web 2.0 capabilities, like blogs, tagging, etc., plus the social features users are accustomed to, such as social groups, project spaces, and status activity postings.
Drupal combines all these capabilities into a single, free package. It accomplishes this through the power of open source, which provides speedy technical advancement from the community with the no‐cost licensing model of free software”

For more information see the following:
Drupal @ blue-bag
Site Maintenance and Hosting@ blue-bag

Leave a Comment June 22, 2010

A couple of great photography books

A couple of great photography books:
Infected Landscape: Israel: Broken Promised Land (Hardcover)
Vitamin Ph: New Perspectives in Photography (Paperback)

Continue Leave a Comment April 19, 2010

Angus Macfadyen Channel swim for the Lawrences Roundbout Well Appeal

Had a chat to this guy at the Brighton and Hove Business Show a really great guy, Planning to swim across the channel to France and raising founds for the “Lawrences Roundbout Well Appeal” an charity that came up with a very creative solution to the water problem in Africa.
I cant imagine what it takes to cross the channel and The Lawrences Roundbout Well Appeal is one of my favourite initiatives so it’s a very worthy cause.
Visit his web site
And join his facebook group

Leave a Comment April 16, 2010

what a great way to hang Paintings

Picture Hanging Strips: No need for Nails Drills or event glue and lives no trace on the wall when removed

Continue Leave a Comment April 14, 2010

Automatic population of the Word Press Database

Automatic population Word Press Database

See Expression Engine Entities, db structure data import and performance for a the related discussion this was part of.

I illustrated how you can create relatively powerful systems with the simple WordPress database modal by populating the database directly using a back end system driven by a well structure data modal.

You do this by creating navigation using the creation maintenance of categories for navigating the relationship, and at every level you can create automatically generated post representing the deferent entities in the database. While the result will be a very de normalized view of the data and can be impossible to maintain through the word press interface it can easily be done by maintaining the structured back end and updating the word press databse.

It is even possible to allow for two way system buy queering posts that have not been auto generated by the back end system.

While I am not advocating this is the perfect way it is a technique that can be used to develop a powerful front end with very little investment.

It can also be used to publish a system to various different front-ends, so you may have a powerful proprietary web site but may want to support varies other interfaces driven by the same data like Web Press blogs white labeling a subset on your system.

Guy Shneerson

Leave a Comment March 5, 2010

Enterprise Thursday presenting Dr. Aleks Krotoski

Enterprise Thursday presenting Dr. Aleks Krotoski

4th March 2010, Corn Exchange, Brighton

Enterprise Thursdays (Sussex University) presents Big Breaks in the Digital Age” Discover how to make it big in the media world – keynote talk by BBC TV’s “Virtual Revolution” presenter Dr. Aleks Krotoski.

After a great session covering Expression Engines architecture me and Adam made our way back to the corn exchange in Brighton looking forward to Aleks’s talk. I was a bit worried that the place will be over packed but luckily it was just perfect with a nice number of people and enough free chairs, not only we had a sit but food and nice wine was available (with all the excitement of the day I dint have much to eat so spot on).

Aleks or as she amusingly enjoys hearing Dr. Aleks talked about the journey that got her were she is today. Her story telling was great and with out bothering to spell it out Aleks’s story illustrated many of the topics that where illustrated in the Wired Sussex Media Jobs + Skills Fair 2010 earlier session.

The talk was followed by a Questions & Answers session, and the questions asked where surprisingly good (and why not? you say, and right you are I answer) and her answers where inspiring (I am in an over excited mood about technology lately but it really was).

Some of the topics I found especially interesting where

Her view on “leveling technologies” involving emerging markets like China Africa as the internet access sweeps the globe (that’s probably as far from her own words as can be but its how I remember it) I especially found that inspiring as: while I lost hope for society as a whole to rectify the many social injustices it created, I still believe that the internet can provide an opportunity for individuals and on line communities to make more then a symbolic change (So now I am both over pessimistic and over optimistic at the same time).

She also talked about many aspects of social networking ranging from the use of branding, the ability of social networks to create a fake sense of ownership & about how successful social media takes a long term approach.

Aleks Krotoski made a bold and interesting statement about facebook being on its way out. My understanding of this is that she referred to on-line communities as a relatively new concept, and as people get used to it they will expect it to mature and reflect more closely their view of real social networks supporting smaller groups i.e. I don’t have 15,000 friends but I only have 10 close friends maybe a 100 other friends 100 people I know through work and another few hundreds online associations. She didn’t actually say all that, its just my interpretation (so if anyone got it from another angle let me know). The way I see it in the Friend Face of the future it may be incredibly rude to ask a complete stranger for friendship.

Some useful links for Dr. Aleks Krotoski :

Aleks Krotoski  http://alekskrotoski.com/

The guardian    http://www.guardian.co.uk/profile/alekskrotoski

Twitter                http://twitter.com/Aleksk

Guy Shneerson

Leave a Comment March 5, 2010

Expression Engine Entities, db structure data import and performance

4th March 2010, not far from Corn Exchange, Brighton

I met my mate Adam from http://www.engaging.net/ and we had an interesting session looking into various aspect of the Expression Engine architecture.

Expression Engine Entities and db structure:

We looked at how its ability to define entities is reflected in the database structure where Expression Engine entities are not created as database entities (DB tables) but instead as record entries in a table, we touched on the possible approaches to a CMS database design touching on issues like advantages of a normalized database with the difficult of creating a CMS that needs to handle an unknown database schema.

Data importing and populating:

We also talked about approaches to populating the Expression Engine MySQL DB from other database and I illustrated the approach to developing a tool that would allow you to import data from normalized databases by interrogating a DB schema. Adam has told me he has had quite a bit of work importing data from people who have given up on Joomla. I pointed out that if Joomla takes the same approach as expression Engine and has no proper normalized architecture it will need a specific implementation of a data import tool.

We also talked about importing data from other sources like web sites and XML and how that can be done using the scripting language I have developed with George Boobyer for blue-bag this language is especially designed for fast visual design of data extraction and transformation for HTML, XML, SOAP and databases.

Adam also showed me his product External Entries allowing EE systems to integrate with none EE MySQL databases

Performance:

We talked about the database as a possible bottleneck especially one like the Expression Engine that duo to its flat nature is not optimized for performance (please correct me if you think you I am wrong). Adam talked about the various tools/approaches that can be used to cash Expression Engine by converting pages or elements with in them to static HTML using  Apache htaccess files.

We also had a chat of a few other technologies like:

  • Ruby on rails Ruby on Rails (Rails or RoR) as a Web application framework
  • Python
  • Django a high-level Python Web framework
  • Pylons a Ruby, Python and Perl web framework

Hopefully next time we can expend on those more

Look out soon for similar session covering the drupal architecture

Guy Shneerson

3 Comments March 5, 2010

WIRED SUSSEX MEDIA JOBS & SKILLS FAIR

Wired Sussex Media Jobs + Skills Fair 2010

4th March 2010, Corn Exchange, Brighton

The event organized by Wired Sussex In association with the University of Sussex

I went along not expecting much I am a Information System architect and a software developer and this was a media fair but I live in Brighton so I gave it a chance besides I was really looking forward to the evening talk by Dr. Aleks Krotoski.

The event was very much aimed at student coming out of college & University looking for a job (fair enough). I sat in on the Routes into media 1:45 – 3:15 and the advice although dry at time (I couldn’t even go up on stage so no complaints) was good advice focusing mainly on the necessity to be pro active including work experience and relevant on line presence and on approaches to approaching companies.

A quick review:

1:50 I only got at the end of Adam Stafford from fresh egg but his talk seemed to be the most engaging of the loot.

2:00 The Animation and design one was very disappointing because it did not talk about Animation and presented a 10 slide presentation of things to do to get a job.

2:10 The Games session by Ben Hebb Art Director of Zoe mode had a very interesting question and Answer session about the route in for a traditional animation.

2:20 Marketing/PR really didn’t like that one Caraline spent most of the talk emphasizing the importance of spelling and grammar (both of which r my week points) and presentation in a very aggressive way saying she bins CVs on any mistakes. While this may important qualifications I do not like aggression and I believe that all industries rely on celebration of different skills, I am no great marketing guru but I believe that today marketing is highly dependent on many technical skills including understanding of technology and that the ability to understand a product and its relevant attraction to its target audience is high on the list.

2:30 Journalism by the Argus editor Jo Wadsworth was the complete opposite of the previous talk. Surly if marketing is not mainly about writing than journalism is. Well apparently not. When Jo presented the question of what journalism is about? “Writing” was the first answer, which was wrong. According to Jo it is about finding the story (I liked that), she did however run through the all the skills needed and those included law, writing and short hand. Hooray describe the essence and than give them all the facts.

I also walked around the exhibiters and had a nice chat about Drupal with Jeremy Spiller from White Hat Media

I than left the place and met my mate Adam for a great Expression Engine session

Guy Shneerson

Leave a Comment March 5, 2010

Brighton Business resources

The following is a list of resources for business and self employed taken from http://brightonjobfair.co.uk/sponsors.php:

sussex university Logo There’s a unique flavour to the University of Sussex that makes studying there a great experience. Their strong reputation for research attracts outstanding academic staff from around the world and provides firm foundations for their teaching excellence. Add to this their proud history for innovative learning approaches and inclusiveness, where everyone is encouraged to make the most of all their talents, and you have a recipe for outstanding success. www.sussex.ac.uk
Brighton and Hove Council Logo Brighton & Hove City Council recognises the important contribution the Digital Media sector makes to our local economy, and is working to encourage new growth and sustainable digital media businesses.www.brighton-hove.gov.uk
SEMN Logo The South East England Development Agency (SEEDA), as the Regional Development Agency for the South East, is responsible for the sustainable economic development and regeneration of the South East of England – the driving force of the UK’s economy. www.seeda.co.uk
CIPD The Chartered Institute of Personnel and Development (CIPD) is the professional body for those involved in the management and development of people. The Institute’s mission is to lead in the development and promotion of good practice in the field of the management and development of people, for application both by professional members and by their organisational colleagues; to serve the professional interests of members and to uphold the highest ideals in the management and development of people. www.cipd.co.uk
Sussex Enterprise Sussex Enterprise is the chamber of commerce for the county and currently has over 2,000 member businesses. Sussex Enterprise offers a wide range of valuable member benefits that can help save you money, reach new customers and get your voice heard on the issues that matter to your business. Benefits include free networking events, legal helpline, HR advice and legal expenses insurance. www.sussexenterprise.co.uk
LSC The Learning and Skills Council exists to make England better skilled and more competitive. We have a single goal: to improve the skills of England’s young people and adults to ensure we have a workforce of world-class standard. The LSC is a non-departmental public body which began work in 2001, taking over the roles of the former Further Education Funding Council and Training and Enterprise Councils. www.lsc.gov.uk
LSC Business Link provides information, advice and support needed to start, maintain and grow a business. It is a government funded service which provides help via its website, business advisers and customer service teams. Business Link’s knowledge of the business support market is unique. Its advisers are experienced in identifying issues and suggesting the right business solutions based on a company’s current and future needs and issues. www.businesslink.gov.uk
SEMN Logo South East Media Network is a business led consortium providing strategic focus for the regions digital content sector, it exists to enable the South East of England’s digital content businesses increase their share of the global market. SEMN provides two way communications between businesses, policy makers and support organisations. It informs local, regional and national strategies and drives improvement in business performance. www.southeastmedianetwork.co.uk

Leave a Comment March 4, 2010

Previous page


Categories

Links

RSS