1

(0 replies, posted in Programming)

i'd like to change www.mywebsite.com/profile.php?id=2 in something like www.mysite.com/users/user_with_id=2

for example, www.mywebsite.com/profile.php?id=2 becomes www.mywebsite.com/users/username

i think that to do this i'll have to modify the way punbb links to users so that i'll be able to view a user's profile by going to www.mywebsite.com/profile.php?username=something, so it'll be possible to rewrite into www.mywebsite.com/users/something.

currently punbb only works by passing the 'id' parameter.

am i right? how can i do this?

I made my upload image system and everything is fine, now i'd like to add avatar support directly from that system: users have their grid of images and checkboxes, they select the one they want to use as avatar and thats it.
what do i have to edit?
i hope you understand my english smile thanks

anyone?

ok i'll try...and how to remove fields from the profile? for example my users dont use yahoo messenger, i want to remove it, is it enough to remove this line?

<label><?php echo $lang_profile['Yahoo'] ?><br /><input id="yahoo" type="text" name="form[yahoo]" value="<?php echo pun_htmlspecialchars($user['yahoo']) ?>" size="20" maxlength="30" /><br /></label>

so that the users wont see the yahoo field or do i have to do something with the db? thanks

thank you very much smile
unfortunately the calendar mod works till 1.2.10 and i have 1.2.11 hmm

i'm searching in profile.php for the lines where it updates data: for example i edit my profile by inserting my icq uin, where is the line where it updates that row on the db?

i'd like to add a "birth date" field but i dont know how to do it..thanks

I created a script to allow users to upload their images and i create a new folder on my server for every user.
i noticed that punbb allows users to register with names containing "forbidden" characters (!*#) and then i can't create a folder with those names, so i'd like to check usernames during registration so that they use only chars allowed by my (linux) hosting

any suggestion is appreciated, i know i have to use something like preg_match, but i don't know how...
thank you smile

8

(12 replies, posted in Programming)

yes, the css is there (with the gifs, the js and the png).
i searched for overlay in the js, but didn't find anything that refers to the png image

oh, im using lightbox, not lightbox plus, but i thing you got it since you told me to add "src="lightbox.js"
sad

9

(12 replies, posted in Programming)

smile
now it is working, no error for header.php, but still no overlay (but the loading gif and close button does work, so where's the problem?)

10

(12 replies, posted in Programming)

mm i made it working but it has great problems:
i added these lines to functions.php (i have a function that prints out the thumbnails):
<HEAD>
<script type="text/javascript" src="lightbox.js"></script>
</HEAD>

cause otherwise it wont work..
now: overlay png isn't there (i have no background for the image), it's all messy and it says (at the very start of the page)

Warning: Cannot modify header information - headers already sent by (output started at /home/mhd-01/www.mysite.net/htdocs/upload/include/functions.php:2) in /home/mhd-01/www.mysite.net/htdocs/upload/header.php on line 34

where do i have to add that header?? thanks again

11

(12 replies, posted in Programming)

codexp: what do i have to put in my website and where? i suppose lightbox.js, and then?
also, how do i use it outside the forum itself? as i told before i created a section called "images" outside the forum!
thank you again

12

(12 replies, posted in Programming)

mm well i dont know if that's what i need:
i created a new section in profile (under essentials, privacy etc) named images where users can upload their images.
i just want it to use lightbox...and i dont know how to do it

and another thing i dont understand: by adding that code to parser.php, if i link an image on a post on the board (such as http://www.site.net/img.jpg) is it meant to be opened with lightbox or does it work only with attached images and images uploaded with imageshack and others?
thank you very much

13

(12 replies, posted in Programming)

i created a little script for users to upload their images (not in their posts)
i'd like to use lightbox (http://www.huddletogether.com/projects/lightbox/)
how do i do it?
the script i created that prints out the thumbnails stays in /include/functions.php, what do i have to add and where?
thank you

14

(10 replies, posted in PunBB 1.2 troubleshooting)

ok, what about punoogle, it seems it does fine for me

15

(3 replies, posted in Programming)

ok uhm..
add this line to functions.php, line 312

<li<?php if ($page == 'images') echo ' class="isactive"'; ?>><a href="profile.php?section=images&id=<?php echo $id ?>"><?php echo "whatever you want" ?></a></li>

then in profile.php, line 1484 (or wherever you want in the list of else ifs) add another else if:

else if ($section == 'images')
    {
        $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile'];
        require PUN_ROOT.'header.php';

        generate_profile_menu('images');

?>
    <div class="blockform">
//whatever you want to appear in the blockform on the right

thats it, there's one thing i dont know: what can i do with "switch case ('images')"? there's a case for every action (display, privacy..) can someone tell me what can i do with it, if i can do something?

at this moment i have no "case ('images')" in my profile.php

thanks

16

(3 replies, posted in Programming)

nevermind, i dont know how but i made it

17

(3 replies, posted in Programming)

I made a simple image uploading script, i'd like to add a section ("Images") in the profile, under "essentials", "privacy" etc, so that users can upload their images, how do i do it? i'm quite a newbie on php programming, i saw there's a switch with various cases (essentials, privacy), but i don't know where to put the new section.

thank you very much

18

(10 replies, posted in PunBB 1.2 troubleshooting)

haha no please tell me, can i wait or it could be a year?

19

(10 replies, posted in PunBB 1.2 troubleshooting)

duhh..but..will it be 1.2.12 ... 1.2.99 -> 1.3 or we are close to it? big_smile

20

(10 replies, posted in PunBB 1.2 troubleshooting)

uh, this is good, when is it expected to be released?

21

(10 replies, posted in PunBB 1.2 troubleshooting)

anyone? hmm

I'd like to rewrite this:
/profile.php?section=messaging&id=2

into something like /username/messages

is it possible? and how?