-
Using Galleria to display images from a JSON Feed
Afternoon, Have installed GalleryCMS and all is working fine. But I have no idea how to display the uploaded images in Galleria from a JSON feed? Anybody able to help? Cheers in advance D4T
-
Trouble with navigation!
Morning, Found the problem, it was just a little mistake in one of the javascript files. Thanks for the help. Regards Donkeyfourthumbs
-
Trouble with navigation!
OK I am really confused now!! When the link to the following file (code) is in, the drop downs work, but the Home button doesn't (function($){ $.randomImage = { defaults: { //you can change these defaults to your own preferences. path: './images/', //change this to the path of your images myImages: ['random_1.jpg', 'random_2.jpg', 'random_3.jpg', 'random_4.jpg' ] //put image names in this bracket. ex: 'harold.jpg', 'maude.jpg', 'etc' } } $.fn.extend({ randomImage:function(config) { var config = $.extend({}, $.randomImage.defaults, config); return this.each(function() { var imageNames = config.myImages; //get size of array, randomize a number from this // use this number as the array index var imageNamesSize = imageNames.length; var lotteryNumber = Math.floor(Math.random()*imageNamesSize); var winnerImage = imageNames[lotteryNumber]; var fullPath = config.path + winnerImage; //put this image into DOM at class of randomImage // alt tag will be image filename. $(this).attr( { src: fullPath, alt: winnerImage }); }); } }); })(jQuery); This code has nothing to do with the drop downs! But when it's not there, the drop downs don't and the Home button does
-
Trouble with navigation!
Yeah that was a mistake, but just fixed that and still doesn't work?
-
Trouble with navigation!
Thanks for the reply, will look into it. Cheers
-
Trouble with navigation!
Morning, having some trouble with a link on a website I am currently trying to build. Can't for the life of me, figure out what I have done wrong. Here is a link to a page that has the trouble: http://www.library.gg/dev/content.php?id=21 Index page works, but once inside the website, you can no longer get back to the index page using the navigation. Any ideas? Regards Donkeyfourthumbs
-
CKEditor
Afternoon, Anyone tried CKEditor yet? If so, how is the following meant to be now with CKEditor <form method="post" action=""> <?php include("config.php"); if (isset($_POST["submit"])) { $txt = $_POST['txt']; $txt = mysql_real_escape_string($_POST['txt']); $result = mysql_query("UPDATE content SET txt='$txt' WHERE id='1'", $db); if ($result) { echo "<meta http-equiv=Refresh content=0;url=index.php>"; } } else { $result = mysql_query("SELECT * from content WHERE id='1'", $db); while ($row=mysql_fetch_assoc($result)){ require('fckeditor/fckeditor.php'); $oFCKeditor = new FCKeditor('txt'); $oFCKeditor->BasePath = 'fckeditor/'; $oFCKeditor->Value = $row['txt']; $oFCKeditor->Height = '400'; $oFCKeditor->Create(); } } ?> <br /><br /> <input type="submit" name="submit" value="Update Page"/> </form> Anybody help? Cheers DFT
-
FCKEditor
Thanks Sam G, but I know how to remove items and amend the toolbar, just not how to get rid of it. Istables, It's because it's just a small text box, don't want anything fancy, CSS styles the area. Maybe I should look at TinyMCE for this instead? DFT
-
FCKEditor
Evening, Anybody, any ideas? DFT
-
FCKEditor
Morning, Anybody know how to get rid of the toolbar completely from FCKEditor. I know how to add or remove items, but can't figure out how to remove it completely! Any ideas DFT
-
PHP, check if field value already exists
Perfect, works like a dream. $qry = "SELECT * FROM table_name WHERE active='1' LIMIT 1; the above just needed an " after LIMIT 1, but apart from that, does what I need it to do. Thanks for your help. DFT
-
PHP, check if field value already exists
It needs to do both thinking about it. If the record being submitted is active and a record already inserted is active, then it needs to return with an error. If the record being submitted is false then it should insert even if a record already submitted is true. Even I'm getting confused!!! Does the above make sense? DFT
-
PHP, check if field value already exists
Once again, thanks MrBrightside, it does work and does do what I asked for, but i just thought of something! For example, if the database has the following 2 records. Company1 Contact1 "Some Nice Words" 'active=1' Company2 Contact2 "Very Nice Words" 'active=0' If i want to add a new record, I want it to check the 'active' value I am submitting. If it is 0 then the record can be added, if it is 1 then I want to return a message. At the moment, if any of the records return 1, then it won't Insert. Does that make sense? Donkeyfourthumbs
-
PHP, check if field value already exists
Thank you MrBrightside. Too much time in front of a computer today, will try first thing tomorrow, but it does make sense and looks like it will work. Thanks Donkeyfourthumbs
-
PHP, check if field value already exists
Evening everyone, I wonder if someone can help. My database has records with 4 fields, one named 'active'. How do I add a record, that first checks the database to see if any of the fields named 'active' have a value of '1' and if it does, does not insert the record, but if none of the records have a value of '1' it will insert it. Does any of the above make sense? If so, can anybody help? Thanks Donkeyfourthumbs