• Home
  • Community
  • Submitted News
FAQ • Search • Login
Forum Home • Register

View unanswered posts | View active topics


Board index » Pligg » Pligg Templates

All times are UTC


Upgrade Template From Pligg v9.9.0 to Pligged V9.9.1



Post new topic Reply to topic  Page 1 of 1
 [ 7 posts ] 
Print view Previous topic | Next topic 
 Upgrade Template From Pligg v9.9.0 to Pligged V9.9.1 
Author Message
LincolnHawks
Site Admin
User avatar

Joined: Wed Dec 12, 2007 9:34 pm
Posts: 296
Post Upgrade Template From Pligg v9.9.0 to Pligged V9.9.1
To get your existing template to work with Pligged v9.9.1 there are some minor changes needed, nothing too special as all the PHP has been taken care of ;)

I have broken down the changes into several posts to differentiate, this will be easier if you do not want the image upload function or any other in your template, i would recommend you carry out all steps to get the best out of the system though.

Step 1 - IMAGE UPLOAD MODULE CHANGES

OPEN: /templates/(your template)/submit_step_2.tpl

FiIND
Code:
<form action="submit.php" method="post" name="thisform" id="thisform">


REPLACE WITH
Code:
<form action="submit.php" method="post" name="thisform" id="thisform" enctype="multipart/form-data">


FIND
Code:
{include file=$tpl_extra_fields.".tpl"}


ADD BEFORE
Code:
{php}
// Start: Image Upload Module
check_actions('image_upload_form', $vars);
// End: Image Upload Module
{/php}


OPEN: /templates/(your template)/link_summary.tpl

At the end of file, copy and paste the below code above the last 2 DIVs of the file.

Code:
{php}
// START: Image Upload Module
check_actions('image_upload_preview', $vars);
// END: Image Upload Module
{/php}


This code triggers the Image Upload module to show the image. Ideally you can place the above code anywhere within link_summary.tpl where you want to image to show up at.

OPEN /templates/(your template)/editlink_edit_center.tpl

FIND around line 25:
Code:
<form action="" method="post" id="thisform">


REPLACE WITH
Code:
<form action="" method="post" id="thisform" enctype="multipart/form-data">


FIND
Code:
{include file=$tpl_extra_fields.".tpl"}


Copy and paste the below code directly above it:

Code:
{php}
// START: Image Upload Module
check_actions('image_upload_form', $vars);
// END: Image Upload Module
{/php}


This code triggers the Image Upload module to show the upload form.

That should be the image upload module working don't forget to create a folder titled /images in your pligg root and CHMOD to 777.


Fri Jun 13, 2008 8:38 pm
Profile
LincolnHawks
Site Admin
User avatar

Joined: Wed Dec 12, 2007 9:34 pm
Posts: 296
Post Step 2 - Delete Discarded Stories
Step 2 - Delete Discarded Stories And Optimize Database

OPEN: /templates/(your template)/admin_templates/admin_links_center.tpl

FIND
Code:
<center><a href="javascript:mark_all_publish()">Mark all for Published</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:mark_all_queued()">Mark all for Queued</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:mark_all_discard()">Mark all for Discarded</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:uncheck_all()">Uncheck All</a></center>


REPLACE WITH
Code:
<center><a href="javascript:mark_all_publish()">Mark all for Published</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:mark_all_queued()">Mark all for Queued</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:mark_all_discard()">Mark all for Discarded</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:uncheck_all()">Uncheck All</a><br><a href="admin_links.php" onclick="javascript:window.open('admin_delete_stories.php', 'resultwindow', 'width=300, height=200')">Delete discarded stories</a></center>


Fri Jun 13, 2008 8:42 pm
Profile
LincolnHawks
Site Admin
User avatar

Joined: Wed Dec 12, 2007 9:34 pm
Posts: 296
Post Step 3 - Slaughterpam Functions
OPEN: /templates/(your template)/admin_templates/user_killspam_step1_center.tpl

FIND
Code:
<fieldset><legend><img src="{$my_pligg_base}/templates/{$the_template}/images/user_killspam.png" align="absmiddle" /> {#PLIGG_Visual_Breadcrumb_User_Killspam#}</legend>
<table style="border:none">
        <tr><td>{#PLIGG_Visual_View_Killspam_Step1#}</td></tr>
        <tr><td><a href = "{$my_pligg_base}/admin_users.php?mode=yeskillspam&user={$user}&id={$id}{$uri_token_admin_users_killspam}">{#PLIGG_Visual_Ban_Link_Yes#}</a>&nbsp;&nbsp;&nbsp;| &nbsp;&nbsp;&nbsp;<a href="javascript:history.back()">{#PLIGG_Visual_Ban_Link_No#}</a></tr></td>
</table>
</fieldset>


REPLACE WITH
Code:
<fieldset>
<legend>
<img src="{$my_pligg_base}/templates/{$the_template}/images/user_killspam.png" align="absmiddle" /> {#PLIGG_Visual_Breadcrumb_User_Killspam#}
</legend>
<table style="border:none">
<tr>
<td>
{#PLIGG_Visual_View_Killspam_Step1#}
</td>
</tr>
<tr>
<td>Bruise The Spam: <a href = "{$my_pligg_base}/admin_users.php?mode=yeskillspam&user={$user}&id={$id}">{#PLIGG_Visual_Ban_Link_Yes#}</a>&nbsp;&nbsp;&nbsp;| &nbsp;&nbsp;&nbsp;
<a href="javascript:history.back()">{#PLIGG_Visual_Ban_Link_No#}</a>
</tr>
</td>
<tr>
<td>
Slaughter The Spam: <a href = "{$my_pligg_base}/admin_users.php?mode=yeskillspam2&user={$user}&id={$id}">{#PLIGG_Visual_Ban_Link_Yes#}</a>&nbsp;&nbsp;&nbsp;| &nbsp;&nbsp;&nbsp;
<a href="javascript:history.back()">{#PLIGG_Visual_Ban_Link_No#}</a>
</tr>
</td>
</table>
</fieldset>


OPEN: /templates/(your template)/user_show_center.tpl

FIND
Code:
                                {if $user_karma ne ""}
                                <tr>
                                <td><strong>{#PLIGG_Visual_User_Profile_KarmaPoints#}:</strong></td>
                                <td>{$user_karma}</td>
                                </tr>
                                {/if}


ADD BELOW
Code:
                                {if ($amIgod || $isadmin)}
                                <tr>
                                <td style='padding-top: 10px;'><strong>SpamBruise:</strong></td>
                                <td><img src="{$my_pligg_base}/templates/{$the_template}/images/user_killspam.png" align="absmiddle"/> <a href="{$my_pligg_base}/admin_users.php?mode=killspam&user={$user_login}&id={$user_id}">{#PLIGG_Visual_View_User_Killspam#}</a></td>
                                </tr>
                                <tr>
                                <td style='padding-top: 10px;'><strong>SpamSlaughter:</strong></td>
                                <td><img src="{$my_pligg_base}/templates/{$the_template}/images/user_killspam.png" align="absmiddle"/> <a href = "{$my_pligg_base}/admin_users.php?mode=yeskillspam2&user={$user}&id={$user_id}">Slaughter Spam This User</a></td>
                                </tr>
                                {/if}


Fri Jun 13, 2008 8:48 pm
Profile
LincolnHawks
Site Admin
User avatar

Joined: Wed Dec 12, 2007 9:34 pm
Posts: 296
Post Step 4 - Ajax Related Stories
OPEN: /templates/(your template)/link_summary.tpl

FIND
Code:
                        {if $Enable_AddTo eq 1}
                                <span id="addto-{$link_shakebox_index}" style="display:none"><br />{#PLIGG_Visual_LS_AddTo#}
                                        &nbsp;&nbsp;<a title="submit '{$title_short}' to del.icio.us" href="http://del.icio.us/post" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url={$enc_url}&amp;title={$enc_title_short}', '{#PLIGG_Visual_LS_Delicious#}','toolbar=no,width=700,height=400'); return false;"><img src="{$my_base_url}{$my_pligg_base}/templates/{$the_template}/images/delicious.png" border="0" alt="submit '{$title_short}' to del.icio.us" /></a>
                                        &nbsp;&nbsp;<a title="submit '{$title_short}' to digg" href="http://digg.com/submit?phase=2&amp;url={$enc_url}&amp;title={$title_short}&amp;bodytext={$story_content}"><img src="{$my_base_url}{$my_pligg_base}/templates/{$the_template}/images/digg.png" border="0" alt="submit '{$title_short}' to digg" /></a>
                                        &nbsp;&nbsp;<a title="submit '{$title_short}' to reddit" href="http://reddit.com/submit?url={$enc_url}&amp;title={$title_short}"><img src="{$my_base_url}{$my_pligg_base}/templates/{$the_template}/images/reddit.gif" border="0" alt="submit '{$title_short}' to reddit" /></a>
                                            &nbsp;&nbsp;<a title="submit '{$title_short}' to FaceBook" href="http://www.facebook.com/share.php?u={$enc_url}&amp;title={$title_short}"><img src="{$my_base_url}{$my_pligg_base}/templates/{$the_template}/images/facebook.png" border="0" alt="submit '{$title_short}' to FaceBook" /></a>
                                        &nbsp;&nbsp;<a title="submit '{$title_short}' to yahoo" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u={$enc_url}&amp;title={$title_short}"><img src="{$my_base_url}{$my_pligg_base}/templates/{$the_template}/images/yahoomyweb.png" border="0" alt="submit '{$title_short}' to yahoo" /></a>
                                        &nbsp;&nbsp;|&nbsp;&nbsp; <a href="javascript:bookmarksite('{$title_url}', '{$enc_url}')">{#PLIGG_Visual_LS_Fav_Book#}</a>&nbsp;&nbsp;
                                </span>
                        {/if}


AFTER ADD
Code:
<span id="related_load-{$link_shakebox_index}" style="display:none"></span>


FIND
Code:
                        {if $link_shakebox_currentuser_votes eq 0 && $link_shakebox_currentuser_reports eq 0}
                                <span id="xreport-{$link_shakebox_index}"><span id="linksummaryBury"><a href="javascript:{$link_shakebox_javascript_report}">{#PLIGG_Visual_Vote_Bury#}</a></span></span>
                        {/if}


ADD AFTER
Code:
                        &nbsp;<span>
                        <img src="{$my_pligg_base}/templates/{$the_template}/images/similar.gif"  style="width:16px;height:16px;margin-bottom:-3px" />
                        <a href="javascript://" onclick="relatedlink_request('related_load-{$link_shakebox_index}',{$link_id},'<br />{#PLIGG_Visual_Loading_Wait#}<img src=\'{$my_pligg_base}/templates/{$the_template}/images/load.gif\'  style=\'width:16px;height:16px\' />','{$tags_str}','{$pagename}')">{#PLIGG_Visual_Story_RelatedStory#}</a></span>
                        <div id="rel_links-{$link_shakebox_index}" style="border:4px solid {if $pagename eq "upcoming"}#0171AF{else}#0171AF{/if};padding-left:5px;margin-top:10px;background:white;display:none">
                        </div>


Download the images in the zip file below and upload them to your templates /images folder.

Attachment:
ajax.related.stories.images.zip


You do not have the required permissions to view the files attached to this post.


Fri Jun 13, 2008 8:51 pm
Profile
onlinebisnes

Joined: Sat Jun 07, 2008 8:43 am
Posts: 5
Post Re: Upgrade Template From Pligg v9.9.0 to Pligged V9.9.1
How to download the image zip file?
Need permission?

Edited:-
Ok I can see the download link now..
tq


Sat Jun 14, 2008 4:06 am
Profile
onlinebisnes

Joined: Sat Jun 07, 2008 8:43 am
Posts: 5
Post Re: Upgrade Template From Pligg v9.9.0 to Pligged V9.9.1
Hi,
I did manage to upgrade,
but there are some issue that came up on my site,

When I try to spamkill user using Bruise The Spam, I got this message = Invalid token (hack attempt) or timeout.
but there is no problem when I choose Slaughter Spam This User.


Sat Jun 14, 2008 7:07 am
Profile
LincolnHawks
Site Admin
User avatar

Joined: Wed Dec 12, 2007 9:34 pm
Posts: 296
Post Re: Upgrade Template From Pligg v9.9.0 to Pligged V9.9.1
onlinebisnes wrote:
Hi,
I did manage to upgrade,
but there are some issue that came up on my site,

When I try to spamkill user using Bruise The Spam, I got this message = Invalid token (hack attempt) or timeout.
but there is no problem when I choose Slaughter Spam This User.



Hi online,

I will take a look asap m8.


Sat Jun 14, 2008 11:09 am
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  Page 1 of 1
 [ 7 posts ] 

Board index » Pligg » Pligg Templates

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

©2007-2008 Social CMS Buzz

Feed XML Favourite Valid XHTML Valid CSS WordPress