Welcome To Snipplr
Everyone's Recent Snippets
- All /
 - JavaScript /
 - HTML /
 - PHP /
 - CSS /
 - Ruby /
 - Objective C
 
Use javascript to add a class of last onto the first and the last li tags in the navigation (add to global.js). Then use css to style. For instance, if the first li is home, you can set the css to hide this link (if you want the logo to act as your h...
        
        
        
            5 
        
        
            1890 
        
                    posted 16 years ago by kstetson
            To arrange multiple dynamic sidebars in wordpress, add the following code snippet into functions.php. The sidebar should then appear in the dropdown menu in wordpress under the widgets section. Next, go into your sidebar.php file & edit the dynamic s...
        
        
        
            2 
        
        
            1165 
        
                    posted 16 years ago by kstetson
            Wordpress has a built in class that you can style to style the down nav state for the page you are on. Adjust div name accordingly.
        
        
        
            1 
        
        
            1634 
        
                    posted 16 years ago by kstetson
            This is a @property to take care of jsonp stuff if you're using CherryPy.
In your Javascript, (you're using JQuery, right?) you can do
`
$.ajax({url:"localhost:8080/MyMethod", data:{'arg1':'foo'}, dataType:"jsonp", success:onMyMethodComplete});
`...
        
        
        
            0 
        
        
            1042 
        
                    posted 16 years ago by ndnichols
            This is just something very simple that I needed to do.
It outputs an xml without any change at all.
        
        
        
            1 
        
        
            1118 
        
                    posted 16 years ago by gryzzly
            Use this function to print out all the rows in a table. Specify columns to show using the columnstring parameter:
tablulardata(tablename, columnstring);
ie:
tabluardata("users","username=Username|fname=First Name|lname=Last Name");
        
        
        
            1 
        
        
            1355 
        
                    posted 16 years ago by kilrizzy
            Use this function to pull all columns from a single database field.
getrowdata(tablename,rowid,prefix);
You would call this function like: 
getrowdata("users",$_SESSION['user'],"user_");
The prefix is the prefix you want for the array names,...
        
        
        
            1 
        
        
            1524 
        
                    posted 16 years ago by kilrizzy
            This code within your CakePHP Controller to include a Model.
        
        
        
            0 
        
        
            1132 
        
                    posted 16 years ago by jdbartlett
            Bind the DropDownList like normal (set DataSourceID, DataTextField, DataValueField), and <%BIND%> the SelectedValue field.  AutoPostBack should be enabled.  In the OnSelectedIndexChanged:
        
        
        
            0 
        
        
            1509 
        
                    posted 16 years ago by jink
            Use this code to pull a DotNetNuke URL from a tab name.  We use this to replace "?tabname=blah" type URLs which do NOT transfer language info.
        
        
        
            0 
        
        
            1475 
        
                    posted 16 years ago by jink
            Basic example of calling a web service from code using GET. You can pass parameters in as query vars.
Assumes return type of service is "String". Example return xml:
    <?xml>
    <string>US</string>
@SNIPPLR TEAM: Please let me put xml at...
        
        
        
            3 
        
        
            1986 
        
                    posted 16 years ago by jasonseney
            Essentially, you need to tell Visual Studio to generate an XML file with documentation, then use a separate tool to create a help file (usually .chm) out of that XML file. The tool to use is MS's Sandcastle. You'll also want a GUI for Sandcastle, whi...
        
        
        
            0 
        
        
            1608 
        
                    posted 16 years ago by pckujawa