51
Cifug
Re: Publisher 1.0 Final ready for testing
  • 2014/5/15 12:06

  • Cifug

  • Quite a regular

  • Posts: 208

  • Since: 2007/12/13


Quote:
Mamba wrote:
Please submit a "feature request" to SourceForge

Done!

52
Cifug
Re: Publisher 1.0 Final ready for testing
  • 2014/5/15 12:31

  • Cifug

  • Quite a regular

  • Posts: 208

  • Since: 2007/12/13


I got this no problems.
Quote:
timgno wrote:
You can create a simple code in preferences and templates like this:

xoops_version.php file:
$i++;
$modversion['config'][$i]['name'] = 'display_pdf';
$modversion['config'][$i]['title'] = '_MI_PUBLISHER_DISPPDF';
$modversion['config'][$i]['description'] = '_MI_PUBLISHER_DISPPDFDSC';
$modversion['config'][$i]['formtype'] = 'yesno';
$modversion['config'][$i]['valuetype'] = 'int';
$modversion['config'][$i]['default'] = 0;


and set to 0 default check.


This I don't really understand...
Quote:
On the user side, look for the php files associated with the template and add this line of code:
$display_pdf $publisher->getConfig('display_pdf');
$xoopsTpl->assign('display_pdf'$display_pdf);


Specifically, the template file, create this condition:
<{if $display_pdf}>
Here the specific html code...
<{/if}>


In templates/publisher_item.html I can't see any reference to makePDF. I can only see edit, delete and download file (not sure what that is). I can't see duplicate, PDF or print.
<!-- BEGIN DYNAMIC BLOCK --><{foreach item=file from=$item.files}>
    <
tr>
        <
td class="odd" align="left">
            <{if 
$file.mod}>
            <
a href="<{$publisher_url}>/file.php?op=mod&fileid=<{$file.fileid}>">
                <
img src="<{$publisher_url}>/images/links/edit.gif" title="<{$smarty.const._CO_PUBLISHER_EDITFILE}>" alt="<{$smarty.const._CO_PUBLISHER_EDITFILE}>" /></a>

            <
a href="<{$publisher_url}>/file.php?op=del&fileid=<{$file.fileid}>">
                <
img src="<{$publisher_url}>/images/links/delete.png" title="<{$smarty.const._CO_PUBLISHER_DELETEFILE}>" alt="<{$smarty.const._CO_PUBLISHER_DELETEFILE}>" /></a>
            <{/if}>
            <
a href="<{$publisher_url}>/visit.php?fileid=<{$file.fileid}>" target="_blank">
                <
img src="<{$publisher_url}>/images/links/file.gif" title="<{$lang_download_file}>" alt="<{$smarty.const._MD_PUBLISHER_DOWNLOAD_FILE}>" />&nbsp;<strong><{$file.name}></strong>
            </
a>

            <
div><{$file.description}></div>
        </
td>
        <
td class="odd" align="center"><{$file.datesub}></td>
        <
td class="odd" align="center"><{$file.hits}></td>
    </
tr>
    <{/foreach}>    <!-- 
END DYNAMIC BLOCK -->

Am I looking in the wrong file?

Thanks,
Marty

53
Bleekk
Re: Publisher 1.0 Final ready for testing
  • 2014/5/15 14:46

  • Bleekk

  • Theme Designer

  • Posts: 940

  • Since: 2002/12/14


1. you must add the code in the xoops_version.php

2. you have to call your Option in the item.php and pass it to the item template
$display_pdf $publisher->getConfig('display_pdf'); 
$xoopsTpl->assign('display_pdf'$display_pdf);


3. now you can use this smarty in the item template
find the pdf part in the item template and use your code
<{if $display_pdf}> 
Here is the pdf smarty that is already defined in the item
<{/if}>

54
Cifug
Re: Publisher 1.0 Final ready for testing
  • 2014/5/16 0:29

  • Cifug

  • Quite a regular

  • Posts: 208

  • Since: 2007/12/13


Thank you timgno & Bleek for your responses. I inserted to 1st two snippets but for the life of me I cannot find where to put the 3rd piece of code.
<{if $display_pdf}> 
Here the specific html code... 
<{/if}>

I even did a full module search for pdf and only 1 html file was found in templates, (publisher_latest_news.html). But this is a block and not the file I need to modify. So, I can't even remove it from the template as I can't find it

The only reason I want to remove it is because tables don't display properly in the resulted pdf file. At first I wanted to try and fix the table issue but turning it off seemed like an easier option at the time considering I don't care if users can open a pdf version of the page.

If anyone else can find the pdf code in the template files let me know

Cheers,
Marty

55
Bleekk
Re: Publisher 1.0 Final ready for testing
  • 2014/5/16 6:08

  • Bleekk

  • Theme Designer

  • Posts: 940

  • Since: 2002/12/14


I am not sure but I think that you are looking for <{$item.adminlink}>

Be sure to include the adminlink smarty in the admin view because the adminlink displays some more things that are important
<{if $display_pdf && $xoops_isadmin}> 
  <{
$item.adminlink}>
<{/if}>

56
Cifug
Re: Publisher 1.0 Final ready for testing
  • 2014/5/19 23:10

  • Cifug

  • Quite a regular

  • Posts: 208

  • Since: 2007/12/13


Thanks so much for your help Bleekk, your comments regarding the adminlink smarty worry me somewhat as I'm thinking I will run into trouble if the module is updated. Maybe I should be trying to fix the PDF formatting issue rather then removing the PDF link. These modifications are beyond my knowledge and I'm afraid I'll be making more trouble than I want. I really appreciate you taking the time to help and I'm sorry that I may have wasted it. For the moment I think I'll just replace the PDF link image with a transparent image so it isn't visible.

Best Regards,
Marty.

57
Bleekk
Re: Publisher 1.0 Final ready for testing
  • 2014/5/20 9:49

  • Bleekk

  • Theme Designer

  • Posts: 940

  • Since: 2002/12/14


I will add the feature to hide pdf and print Icons as soon as possible to Publisher. maybe in the next 3 or 4 days

58
Cifug
Re: Publisher 1.0 Final ready for testing
  • 2014/5/20 11:50

  • Cifug

  • Quite a regular

  • Posts: 208

  • Since: 2007/12/13


Oh man, that would be fantastic Bleekk. Thank you so much, I know how busy you guys are.

The feature request I made is here:http://sourceforge.net/p/xoops/feature-requests/426/

Very appreciative,
Marty.

59
Mamba
Re: Publisher 1.0 Final ready for testing
  • 2014/5/20 11:55

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Do the following: in modules\publisher\language\english\modinfo.php add:
define("_MI_PUBLISHER_DISPLAY_PDF","Display PDF Icon");
define("_MI_PUBLISHER_DISPLAY_PDF_DSC","Select Yes to show PDF icon and allow users to create PDF files");
in modules\publisher\xoops_version.php add around line 1011, after the the 'display_breadcrumb' part following:
++$i;
$modversion['config'][$i]['name']        = 'display_pdf';
$modversion['config'][$i]['title']       = '_MI_PUBLISHER_DISPLAY_PDF';
$modversion['config'][$i]['description'] = '_MI_PUBLISHER_DISPLAY_PDF_DSC';
$modversion['config'][$i]['formtype']    = 'yesno';
$modversion['config'][$i]['valuetype']   = 'int';
$modversion['config'][$i]['default']     = 1;
In \modules\publisher\class\item.php around line 450 find and add the first line above the //PDF button, and and the closing bracket, so it looks like this:
if ($this->publisher->getConfig('display_pdf')) {
// PDF button
$adminLinks .= "<a href='" PUBLISHER_URL "/makepdf.php?itemid=" $this->itemid() . "' rel='nofollow' target='_blank'><img src='" PUBLISHER_URL "/assets/images/links/pdf.gif' title='" _CO_PUBLISHER_PDF "' alt='" _CO_PUBLISHER_PDF "' /></a>";
$adminLinks .= " ";
}
You'll need to do the same in the \modules\publisher\blocks\latest_news.php file around line 198:
$item['pdf'] = '';
if (
$this->publisher->getConfig('display_pdf')) {
            if (
$options[25] == 1) {
                
$item['pdf'] = "<a href='" PUBLISHER_URL "/makepdf.php?itemid=" $itemObj->itemid() . "' rel='nofollow'><img src='" PUBLISHER_URL "/assets/images/links/pdf.gif' title='"
                    
_CO_PUBLISHER_PDF "' alt='" _CO_PUBLISHER_PDF "' /></a>&nbsp;";
            }
}
Let us know if it works, and we'll add it to SVN. Bleekk, feel free to modify/change it as needed.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

60
mjoel
Re: Publisher 1.0 Final ready for testing
  • 2014/5/21 11:54

  • mjoel

  • Quite a regular

  • Posts: 325

  • Since: 2006/12/9


i would like to request for redesign for the publisher archives section...


i have article from 2009 until 2014..right now it lay-out a long list of months

is it possible to arrange it by month by year ?

something like
Year 2014
Jan. Feb etc


i have found a similar topic for the news module
https://xoops.org/modules/newbb/viewtopic.php?post_id=163853

anyone can do a hack for publisher ?

Login

Who's Online

148 user(s) are online (95 user(s) are browsing Support Forums)


Members: 0


Guests: 148


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits