Fork me on GitHub

Search Query and others useful things  Bottom

  • Im running a gaming site and have a different topic for every game.
    Are the following possible :

    1) I would like to have at the bottom of every article a link that would say buy this game on amazon.com
    > i retrieves the topic name and inserts in the link so when the suer cliks the link it brings him to the amazon search results.


    2) At the top of every topic page and article i kneed a link that says 'Search for Downloads for (Topic/(Game) Name)' then points to the search results for downloads
    > Its again a mather of knowing how to handle search queries and to know how to retrieve the topic name and insert it into the query ...

    3) Is it possible to have a block under related stories that displays all the pics in a directory
    > If my topic is called half-life2 its retrieves and displays all pics in the directory /images/screens/half-life2/

    I think these features if they are fesable would be very useful to many gaming sites running on postnuke.

    Thanks in advance for your help :)
  • Most of what you want to do can be done in the theme.php in the themearticle() part that displays the whole story.

    To get the topic name, for example, you would use the variable $info[topictext]. You could then include it in your theme as part of a query string pointing to the Amazon search (assuming you can do that sort of thing with Amazon.)

    Check this post in the first section for a link to a story variable reference for other story vars at your disposal.

    As for #3, I don't know about a block, but remember that PHP is at your disposal where themes are concerned, so you could include any PHP you find to fetch and display images in a particular directory based on the story topic, etc... A better solution, I think, would be to install a gallery module and then have a link at the bottom of articles to the gallery subsection based on the topic.

    --
    Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

    Cape Cod Travel Info...

This list is based on users active over the last 60 minutes.