71
script_fu
Re: User profile viewable by user and admin only?

The last little bit can be found in the Faq section. This does not solve my problem either.

The solution might be in the above code. But at this moment in time its not clear to me yet. I've tested all of this and it didn't do what I needed. I've been up all day hacking a site to conform to the specs needed by the client.

Forgive me if the correct code is here and I did not implement it correct.

I will say that after an extensive search I could not find any more related examples.

Thanks for any help in advance...



72
script_fu
Re: User profile viewable by user and admin only?

Then we have Dave_L post about userinfo.html. The problem is dave post is newer than montys. Monty says system_userinfo.html which I can find in the system module. I cannot find a file called userinfo.html in the XOOPS 2.0.17.1 package.

Now which code should I put where for my needs?


Quote:

Dave_L wrote:
If you want to, you could simplify those if-clauses:

<{if $user_ownpage || $xoops_isadmin}>
.
.
profile table
.
.
<{/if}>


<{if !$user_ownpage}>
<
center><h3>Please login to view the profile</h3></center>
<{/if}>



73
script_fu
Re: User profile viewable by user and admin only?

Here is Nachenko post on some smarty tags. but they are incomplete.

Quote:

nachenko wrote:
I think some Smarty code in the template should do the trick.

something like:

If user we are viewing ($user_uid) is ourself ($xoops_user), or the user is an admin...

<{if $user_uid == $xoops_user || $xoops_isadmin}>

code we want to show

<{/if}>

You'll have to check exact name of smarty variables, I'm not sure I wrote them properly.



74
script_fu
Re: User profile viewable by user and admin only?

Montys code works great. But on 2.0.17.1 it will only let the account holder see their own profile.

Logged in as admin I can only view my own profile.
Logged in as registered user they can only view their own profile.
Logged in as user in custom group they can only view their own profile.

Here is what im looking for.

1) I need the users to be able to see the admin /webmasters profile.

2) I need the users to be able to see the mods profile.

3) I need the admin to see all profiles.

4) I need the mods to see all profiles.



75
script_fu
.Pdf Layout and Print Layout. How to make my site L@@K better.

My layout does not look to bad in a news story. But I am having an issue once the news story has been converted to a .pdf on the fly with xoops. I was wondering has any one every tried to layout a news story with the intent on making the .pdf and print job look good?

Contract:
Manager
<
img style="padding: 15px; float: right; display: block;" src="logo.jpg" />
Some content for a news story.Some content for a news story.Some content for a news story.Some content for a news story.Some content for a news story.Some content for a news story.Some content for a news story.

More Content
-----
Date01/30/2008
Time
15:30
-----
More Content
More Content
More Content
More Content
More Content
-----
More Content
More Content

<div class="head">
<
center>More Content</center>
<
div class="odd">
<
center>
[
gallery title=More Content]1[/gallery
[
gallery title=More Content]2[/gallery
[
gallery title=More Content]3[/gallery
[
gallery title=More Content]4[/gallery]
</
center>
</
div>
</
div>


The .pdf document does not follow the format of my news story. The pictures are straight up and down in the .pdf but in the news story they are displayed from left to right.

My question is what can I do to make sure my .pdf's look the same as the news story. It would also be nice to have the send to printer layout look the same. Where do you modify the print and .pdf layout in xoops? Or can you make this out put look better just by using a standard news topic like above for the format.



76
script_fu
Re: Lightbox, gallery tags, news 1.56 & Pdf problems with TCPDF error

Well that certainly fixed the problem. Thank you Will! I can only assume you patched both the frameworks and the class module.textsanitizer.php ??

For others who might need this. This hack shuts down any other picture format that you might want to use with lightbox. Only .jpg files will work with this hack.

It suits what I need to do and thus is the solution to my problem. Another big thank you goes out to Will for the fix.

-----

Now that the pdf on the fly is working I have another issue about the formatting of them.

I will start a new topic about this.



77
script_fu
Re: Lightbox, gallery tags, news 1.56 & Pdf problems with TCPDF error

I am listening to you. Because of your posts we are getting closer to fixing the problem.

You are under the opinion it is in extgallery. Good I understand you position. You also said the issue can be solved in the image manager.

Would you be so kind as to post your fix?

Now I think Z's code is working like it should. When you right click the thumb and hit save its a .jpg

This leads me to think that the issue might not be in the extgallery module.

This is how issues get solved. By working together. You don't half to talk down to me or better yet treat me like a fool.

You really might not be correct about this... But you keep coming here and insisting that the problem is this or that without the code is helping know one.



78
script_fu
Re: Lightbox, gallery tags, news 1.56 & Pdf problems with TCPDF error

I have verified that the .jpg format will work in news and can be turned into a .pdf

Now when you download a thumb from extgallery the format of the picture is hook-thumb.php.jpg and they work when you click on them.

So Mr. Zoullou is doing the code correct as a thumb. But somewhere the .jpg info its getting lost by TCPDF when ported into the .pdf

So does this now lead us away from Z's code and put it back on TCPDF? Or is the issue really in extgallery.

Any bets on this people? How can you tell for sure were the problem lays?



79
script_fu
Re: Lightbox, gallery tags, news 1.56 & Pdf problems with TCPDF error

When trying to save a extgallery thumbnail inside of a news story the file extension is hook-thumb.php.jpg

For god sakes how the hell can that be fixed and still work?

What a mess...



80
script_fu
Re: Lightbox, gallery tags, news 1.56 & Pdf problems with TCPDF error

So Will you saying the problem is in the

extgallery/hook-thumb.php

<?php
// $Id$
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <https://xoops.org/>                             //
// ------------------------------------------------------------------------- //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //

require '../../mainfile.php';
include_once 
XOOPS_ROOT_PATH.'/modules/extgallery/class/publicPerm.php';

if(!isset(
$_GET['id'])) {
    
$photoId 0;
} else {
    
$photoId intval($_GET['id']);
}

$photoHandler xoops_getmodulehandler('publicphoto''extgallery');
$photo $photoHandler->get($photoId);

switch(
strtolower(strrchr($photo->getVar('photo_name'), "."))) {
    case 
".png"$type "image/png"; break;
    case 
".gif"$type "image/gif"; break;
    case 
".jpg"$type "image/jpeg"; break;
    default: 
$type "application/octet-stream"; break;
}

$permHandler ExtgalleryPublicPermHandler::getHandler();
if(
$permHandler->isAllowed($xoopsUser'public_access'$photo->getVar('cat_id'))) {
    
$photo $photoHandler->objectToArray($photo);

    
header ("Content-type: ".$type."");
    
readfile(XOOPS_ROOT_PATH."/uploads/extgallery/public-photo/thumb/thumb_".$photo['photo_name']);
} else {
    
header ("Content-type: ".$type."");
    
readfile(XOOPS_ROOT_PATH."/modules/extgallery/images/not-allowed.jpg");
}

?>


I see some stuff in there but will need to study it a little.


Now about the other point you made. You not 100% on the TCPDF issue. I am still having problems with pdf generation in other places in the news that does not have the gallery tags in them. If you have a .gif file in a news story I don't care what you do you cannot make a .pdf period. Maybe the new release of tcpdf has fixed this issue.




TopTop
« 1 ... 5 6 7 (8) 9 10 11 ... 133 »



Login

Who's Online

147 user(s) are online (110 user(s) are browsing Support Forums)


Members: 0


Guests: 147


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