Go Back   Pligg CMS Forum > Pligg Development > Pligg Templates > Template Support > "yget"

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-20-2008, 10:20 PM
Casual Pligger
 
Join Date: Aug 2007
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Wink Setting a default image? or

Hi Guys!!

I was wondering if anyone knows how to set a default picture so that when someone adds a new story without a picture a default photo will appear... it will make my site look alot nicer... or if someone knows how to set it up so it's manditory to upload a pic??? any help would be fab!

Thanks
__________________
http://www.gcurious.com
Reply With Quote
  #2 (permalink)  
Old 06-10-2008, 02:45 PM
Casual Pligger
 
Join Date: Aug 2007
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
anyone??... like even if there profile pic comes up instead or something?
__________________
http://www.gcurious.com
Reply With Quote
  #3 (permalink)  
Old 07-21-2008, 12:19 PM
joehunk's Avatar
Casual Pligger
 
Join Date: Oct 2007
Posts: 99
Thanks: 14
Thanked 10 Times in 8 Posts
filter using {if} statement. depends on the coding, you may want to share us the part that you show image on your site. code on your link_summary.tpl file.
__________________
-------------------------------
click to my mini-Pligg Site
Reply With Quote
  #4 (permalink)  
Old 07-21-2008, 04:58 PM
catchpen's Avatar
Pligg Donor
 
Join Date: Jan 2008
Posts: 209
Thanks: 30
Thanked 18 Times in 13 Posts
it depends if you are using the image upload module or a WYSIWIG editor to upload pictures. This might work if you're using the image upload module:
link_summary.tpl replace:

Code:
 {php}
               // START: Image Upload Module
               check_actions('image_upload_preview', $vars);
               // END: Image Upload Module
               {/php}
with
Code:
{if $link_field1 neq ''}
                        
               {php}
               // START: Image Upload Module
               check_actions('image_upload_preview', $vars);
               // END: Image Upload Module
               {/php}
                       
                       
		       {else}
		               
					   <a href = "urlpathtolargepic"><img src="urlpathtothumbnail" /></a>>
					   
					   {/if}
Reply With Quote
  #5 (permalink)  
Old 08-22-2008, 01:40 PM
Casual Pligger
 
Join Date: Aug 2007
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Hi thanks very much for responding .... i tried that code but it didn't seem to work... the pictures wern't showing up at all on the site... I'm using the image uploader... any other suggestions?


My code to show images is the following


{php}
// START: Image Upload Module
check_actions('image_upload_preview', $vars);
// END: Image Upload Module
{/php}
__________________
http://www.gcurious.com

Last edited by gossipqueenie; 08-22-2008 at 01:47 PM..
Reply With Quote
  #6 (permalink)  
Old 08-22-2008, 04:56 PM
Casual Pligger
 
Join Date: Jul 2008
Posts: 33
Thanks: 2
Thanked 0 Times in 0 Posts
Find this code in your image_upload_main.php

PHP Code:
         if ($main_smarty->get_template_vars(module_imageupload_filename_field) == "")
        {
                
$imageFile module_imageupload_fullsize_prefix.$storyID.".jpg";
        } else {
                
$imageFile $main_smarty->get_template_vars(module_imageupload_filename_field);
        } 
change it to
PHP Code:
        if ($link->link_field1 == "")
        {
                
$imageFile "MyDefaultImage.jpg";
        } else {
                
$imageFile $link->link_field1;
        } 
You should have MyDefaultImage.jpg in your images directory.
__________________
A Chinese Digg Site!
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP!!! Table 'pligg.pligg_links' doesn't exist bittermoon1 Installation and Upgrade Help 3 03-29-2007 03:06 PM
Upgrade from 5.10 to 9 bizdiggers Installation and Upgrade Help 19 02-11-2007 04:21 AM
Installation - Tables never created julientarta Installation and Upgrade Help 28 02-02-2007 11:04 PM
Error: SQL/DB Error -- [Table 'frat.links' doesn't exist] r0ssta Installation and Upgrade Help 8 10-08-2006 06:14 PM
MySQL problem in Beta 8 RC1 install lancey Bug Report 13 10-04-2006 01:28 PM


Search Engine Friendly URLs by vBSEO 3.2.0