yeah ive done that...it doesnt even work if that is the only thing in the else statement actually.

Maybe it is an issue with the mod that it has to be called from a file inside the PUNBB folder, I don't know

all the best

Nick

no takers?

this is my shamelessly putting my post back to the top smile

Hi

I have the private message mod installed and it works great.

However I would like to get the "new messages" link (which lights up when you have new messages) into the universal loginbox that my site has.

http://www.amateurillustrator.com

http://www.amateurillustrator.com/forums/

so people know if they have new messages even if they are not on the forums page.

this is my univeral login box code:

<?php

define('PUN_ROOT', './forums/');
include './forums/include/common.php';

global $pun_user;

if ($pun_user['is_guest']) {
echo '<a>Username  &  Password</a>';
  echo "<form color=\"000000\" id=\"login\" method=\"post\" action=\"/forums/login.php?action=in\" onsubmit=\"return process_form(this)\">
<input type=\"hidden\" name=\"form_sent\" value=\"1\" />
<input type=\"hidden\" name=\"redirect_url\" value=\"http://www.amateurillustrator.com/join.php\" />
<input type=\"text\" name=\"req_username\" size=\"25\" maxlength=\"25\" />
<input type=\"password\" name=\"req_password\" size=\"16\" maxlength=\"16\" />
<input type=\"submit\" name=\"login\" value=\"Login\"/>
</form>";

echo '<a href="join.php">Want an account?</a>';

echo '<a>                    </a>';echo '<a>         or          </a>';echo '<a>                   </a>';
echo '<a href="/forums/login.php?action=forget">Forgot your password?</a>';
}

else {
echo "Logged in as: ".pun_htmlspecialchars($pun_user['username'])."
<br>Click <a href=\"/forums/login.php?action=out&id=".$pun_user['id']."&location_out=".$_SERVER['SCRIPT_NAME']."\">here</a> to log out.</div>";
}

?>

now I have tried adding this line to the else bit which is the same line added to header.php to make the new messages link appear inside punbb:

require(PUN_ROOT.'include/pms/header_new_messages.php');

but I get the following errorr:

Parse error: syntax error, unexpected T_REQUIRE in /home/amateuri/public_html/testing.php on line 95


Any help would be great, thanks a lot

cheers

Nick

thanks

I'll fix it tomorrow smile

105

(26 replies, posted in PunBB 1.2 show off)

yeah its crazy,

It's amazing how much scrutiny you get when they write an article there...I am 21 and am an illustration student...of course its not going to be as good as some huge site like deviant Art wih 240 million works of art on it  smile

Sorry i've just been reading some of the comments on sites like digg.com and feel the need to vent.

I hadn't heard of TechCrunch till 3 days ago when someone suggested to me that I get listed there.

I'm grateful for the traffic which is high, although I think it is dying down now.

All the best

Nick

only happens in IE  (i have version 6 of IE)

sorry for the crappy post...administrating this site is really swamping me

http://www.amateurillustrator.com/forum … m.php?id=2

there is some overlapping at the bootom...you can only see the very top of "post new topic"

what do you think causes this?

Any help would be great

thanks,

Nick

108

(26 replies, posted in PunBB 1.2 show off)

yeah I was really pleased, it generated a lot of traffic on our second day online  we now have over 120 users in 2 days

go pubb smile

109

(26 replies, posted in PunBB 1.2 show off)

Cheers guys smile

110

(26 replies, posted in PunBB 1.2 show off)

So today i am launch my site which is a community site for illustrators.

It uses punbb with coppermine integration.

Thanks for all the help over the last couple of months

The thing i most proad of is the integrated loginbox at the top of every page that will log u into both coppermine and punbb.

Let me know what u think:

AmateurIllustrator.com

Cheers

Nick

solved it now...the problem was that the php constant $_SERVER['DOCUMENT_ROOT'] isn't setup right on my server (as it isn't for many virtual servers that use Apache) and phpthumb that is used by image_upload to make the thumbnails uses $_SERVER['DOCUMENT_ROOT'] in its code....

to fix this problem I simply replaced all instances of $_SERVER['DOCUMENT_ROOT'] in the file phpthumb.class.php with ''

I did the same thing when setting up copperminefetch or cpmfetch for those of you who are familiar with coppermine.

Cheers

Nick

By the way I am getting this error log (in the error log in my server control panel) when i try and make a post with an image in it.

SUEXEC error_log:

[2006-06-23 11:50:01]: info: (target/actual) uid: (amateuri/amateuri) gid: (amateuri/amateuri) cmd: post.php
[2006-06-23 11:50:12]: info: (target/actual) uid: (amateuri/amateuri) gid: (amateuri/amateuri) cmd: post.php
[2006-06-23 11:50:22]: info: (target/actual) uid: (amateuri/amateuri) gid: (amateuri/amateuri) cmd: viewtopic.php

I do not really know what this means but there is are two amateuri's which is a little odd mabe the path is wrong somewhere?

anyone make sense of these?

Hi I have an issue with image upload.

So it is a clean install of punbb 1.2.12 and the latest version of image upload (i modded the install so that it would install on 1.2.12)

So i went through the install extrememly carefully and it seems to all work fine except that the thumbnails are missing...when I upload an image it all goes fine...I can see it on the server but the thumbnails are not in the folder.

And when I run the image upload error checker it says missing thumnails in the posts where I have tried to upload images.

I have all the permissions of folders set to 777 and unlike the other user who had a similar problem with thumbnails I get no error messages when deleting posts with images in.

I am not sure what the problem is other than that thumbnails are not being created.  It is the latest version of php 4 on an apache server.

Any ideas?

By the way great plugin NightFalcon well it will be once I get it working smile

Cheers

Nick

here is the post:
http://www.thebutterflyfilm.co.uk/to-show.gif

here is the final result

still couldn't get rid of those bullet points but whatever!

http://www.thebutterflyfilm.co.uk/forpunforum.gif

cheers for the help

Nick

thanks thats done it...I'm new to css so don't always know what it can and can't do.  Also am using golive which isnt the greatest at css i think.

it was actually this that made it work though.... {  white-space: nowrap;   }

Cheers

Nick

just have it cut off with the three dots.  Or '&hellip' bit.

Thanks

oh cool diddn't know that...


still has anyone else experienced this text wrapping onto the line below with this...its annoying because it would be nice to put a background image with some 'fake rows' behind the recent posts.  And if the text wraps when the topic is a certain length it prevents me from being able to do this.

Also is there a way to get rid of the bullet point from the beggining of each recent topic?

Cheers

Nick

http://www.thebutterflyfilm.co.uk/Untitled-1.jpg

Hi

so I am including a 10 most recent topics box on my homepage....here is the code:

<?php
include('http://www.mysite.com/forum/extern.php?action=active');
?>

I altered the extern.php file so it returns 10 posts instead of the default 15.

What is annoying me is the way the topic titles text wrap so if the topic is a certain length the line takes up 2 lines...most of the time it only takes up one line with three '...' but sometimes the text wraps instead.....is there a way of altering extern.php to prevent this.

Here is the section of extern.php in question:

    // Output regular HTML
    else
    {
        $show = isset($_GET['show']) ? intval($_GET['show']) : 10;
        if ($show < 1 || $show > 50)
            $show = 10;

        // Fetch $show topics
        $result = $db->query('SELECT t.id, t.subject FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL'.$forum_sql.' ORDER BY '.$order_by.' DESC LIMIT '.$show) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

        while ($cur_topic = $db->fetch_assoc($result))
        {
            if ($pun_config['o_censoring'] == '1')
                $cur_topic['subject'] = censor_words($cur_topic['subject']);

            if (pun_strlen($cur_topic['subject']) > $max_subject_length)
                $subject_truncated = pun_htmlspecialchars(trim(substr($cur_topic['subject'], 0, ($max_subject_length-1)))).' …';
            else
                $subject_truncated = pun_htmlspecialchars($cur_topic['subject']);

            echo '<li><a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.$subject_truncated.'</a></li>'."\n";
        }
    }

I have tried playing with the max_subject_length but it does not stop the text wrapping.

Help would be great

thanks

Nick

Hi

Yes you are right I think it is a problem of scope....I am trying to use global $db from within a function so it is not actually global.

I have to use it within a function though....this is the nature of coppermine.  Is there a superglobal for $db something like $GLOBALS[db] that might work?

here is the code :

function pageheader($section, $meta = '')
{
   global $CONFIG, $THEME_DIR;
   global $template_header, $lang_charset, $lang_text_dir;

   if(empty($custom_header)){
  
define('PUN_ROOT', 'pathe to pun root/');


global $db;
global $pun_user;
 
include 'path to /common.php';


if ($pun_user['is_guest']) {


echo '<a>Username  &  Password</a>';
  echo "<form id=\"login\" method=\"post\" action=\"/pun/login.php?action=in\" onsubmit=\"return process_form(this)\">
<input type=\"hidden\" name=\"form_sent\" value=\"1\" />
<input type=\"hidden\" name=\"redirect_url\" value=\"".$_SERVER['SCRIPT_NAME']."\" />
<input type=\"text\" name=\"req_username\" size=\"25\" maxlength=\"25\" />
<input type=\"password\" name=\"req_password\" size=\"16\" maxlength=\"16\" />
<input type=\"submit\" name=\"login\" value=\"Login\" />
</form>";

echo '<a href="/pun/register.php">Want an account?</a>';
echo '<a>                    </a>';echo '<a>         or          </a>';echo '<a>                   </a>';
echo '<a href="/pun/login.php?action=forget">Forgot your password?</a>';
}
else {
echo "Logged in as: ".pun_htmlspecialchars($pun_user['username'])."
<br>Click <a href=\"/pun/login.php?action=out&id=".$pun_user['id']."&location_out=".$_SERVER['SCRIPT_NAME']."\">here</a> to log out.</div>";
}

Thanks for the reply.

I have spent so f***ing long on this I just went for a compromise which works well enough and shouldn't compromise the ease of use of the site too much (which is what this is all about a social networking site for artists).  I being one of the artists who will use this site have very little knowledge of programming or scripting...but hey I press on.

I traced the problem to something to do with the database bridge of coppermine and punbb and not being able to call punbb functions from within coppermines theme file.   Well I think that was it....!

I'm going for a drink   smile

Sorry in advance as this is not really punbb's problem but I think this forum may be more helpful than coppermines.

So I have bridged coppermine with punbb and it works fine they share a cookie etc....however I get trouble when:

to include php code in the header of coppermine you must put it in a file named theme.php (for those of you unfamiliar with coppermine).  So I have put a loginbox in that file and it works fine without any parse errors but there is a 'if' and 'else' statement in the loginbox php code and it refers to $define_user.  So what is happening is that it always comes back as guest no matter what....even if I am logged into coppermine and punbb.


By the way the same loginbox works fine as a standalone .php file in the same directory as theme.php its just when I try and merge them that it breaks and the cookie starts only returning guest.

I know this is probably not punbb's problem but I am just wondering if anyone has any idea what I am doing wrong.

Thanks


Nick

Sorry I am an idiot a bit of hunting around and I found that main.tpl will parse php as long as you put the php in the include/user directory.


Man I wasted ages on this....should have searched the docs way earlier.  smile

Sorry I will try to be concise with my explanation.

So I have integrated punbb into my site reasonably well by modding the main.tpl file.

However I would really like to have a php function (a login box I have already written and works great) running in my menu bar (that I have put in the main.tpl file)...now I have found that php does not execute inside the main.tpl file so I tried renaming the main.tpl file main.tpl.php and then modding the footer.php (or header.php I can't remember) to look for main.tpl.php.  But it still doesn't run the php.

So I found a workaround which is to use an inline frame, make the php loginbox a seperate file and link to that....this works great until you click on a link in the login box (eg 'Forgort your password?') and then the link opens in the inline frame and you can only see 1/10th of the page.

Now a friend told me I could maybe fix this by putting a javascript in the login php file that tells the links to open in a new window....but I have little knowledge of how to do this.

Any help would be very greatly apreciated....Ideally there would be a mod to allow the main.tpl file to run php but I don't think this is possible.  What would also work is if there was a php command to make links in php open in a new window (or ideally a window of my choosing)  I doubt this is possible though.

Thanks

Nick

you know those "idiots guides too" series something like that smile

Well not quite that just some pointers really I'm a total noob to this stuff.

I'll take a look...its just learning from looking at code is often slower than asking someone so I thought I'd ask first.

Cheers

Hi

This is a good link but doesn't tell you much on how to do it yourself....it ust does it for you by typing in colours.

how would the creator of say this punbb forum go about creating his style:

http://www.haveamint.com/forum/viewforum.php?id=4



Cheers

Nick