Results 1 to 4 of 4
  1. #1
    Senior Member Ascendancy's Avatar
    Joined
    Jan 2008
    Location
    Massachusetts
    Posts
    133
    Version
    1.2.0
    Site
    http://sourcecanvas.com/

    How to Query the Databse?

    I am interested in creating a tpl-functions.php file in my theme's main directory and then including it into the header section, just to load some simple page functions I want to try out. Would I need to open a new database connection or would it still be open if I included the file this way, and if it's not do you know what file I can check out to see how to connect to the Pligg DB?

  2. #2
    Senior Member Ascendancy's Avatar
    Joined
    Jan 2008
    Location
    Massachusetts
    Posts
    133
    Version
    1.2.0
    Site
    http://sourcecanvas.com/
    Bump, hopefully someone could hold the answer?

  3. #3
    Senior Member lowster11's Avatar
    Joined
    Oct 2009
    Posts
    262
    Site
    http://www.pligg-designs.com
    I believe that you just query:

    Code:
    <script src="{$my_pligg_base}/modules/jquery/js/jquery.js" type="text/javascript"></script>
    
    <script src="{$my_pligg_base}/modules/jquery/js/jquery.autoresize.js" type="text/javascript"></script>
    <script src="{$my_pligg_base}/modules/jquery/js/jquery.fancybox.js" type="text/javascript"></script>
    <link rel="stylesheet" href="{$my_pligg_base}/modules/jquery/css/fancybox.css" type="text/css" media="screen">
    {literal}
    <script type="text/javascript">
        $(document).ready(function() { $("a#single_image").fancybox(); $("a#inline").fancybox({ 'hideOnContentClick': false }); $("a.group").fancybox({ 'zoomSpeedIn': 200, 'zoomSpeedOut': 200, 'overlayShow': false }); }); 
    </script>
    {/literal}

  4. #4
    Senior Member Ascendancy's Avatar
    Joined
    Jan 2008
    Location
    Massachusetts
    Posts
    133
    Version
    1.2.0
    Site
    http://sourcecanvas.com/
    Well all of that code is just JavaScript and CSS... What I was trying to do was edit the sidebar module by querying the database. Currently my sidebar shows short title's of stories, which is good because it saves space. However I want to make it so when people hover over the link, the tooltip shows the full story title. I can't seem to find a readily-saved variable in the sidebar modules for the full story's title, so I am looking to just query the DB and grab it myself

Similar Threads

  1. How do I modify a query
    By speak in forum Questions & Comments
    Replies: 1
    Last Post: 12-20-2009, 11:09 PM
  2. Mysql DB query
    By argh2xxx in forum Questions & Comments
    Replies: 0
    Last Post: 02-19-2008, 02:01 PM
  3. Can you help me with this query?
    By dollars5 in forum Questions & Comments
    Replies: 4
    Last Post: 01-17-2008, 02:43 AM
  4. Custom Query.. But How?
    By borbor in forum Questions & Comments
    Replies: 3
    Last Post: 12-09-2007, 07:06 PM
  5. SQL Query needed.
    By DuckFat in forum Questions & Comments
    Replies: 0
    Last Post: 07-27-2006, 11:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Pligg Modules and Pligg Templates from Pligg Pro Donate to Pligg CMS Dreamhost Web Hosting Host Gator Web Hosting