26

(28 replies, posted in Programming)

Can't use an encrypted button with PayPal because it encrypts the amount.

Make a button and put in a set price like 999. Choose non-encrypted you should get a line that is exactly the same as the grand total code line but has 999 for the value.

27

(5 replies, posted in PunBB 1.2 show off)

Oh yea, I took off the test so I updated the links above, or just use my sig link and go to "Forum" from there...

28

(28 replies, posted in Programming)

checkout http://www.yorkesofdundee.co.uk/ORDERFORM/ or the index.html of the download and it gives you code to put into a PayPal button in place of the amount field. That's probably the easiest ... add a link on the submit page that says "Pay Now for quickest results, or we will email you a bill" and have the PayPal button show up there.

29

(5 replies, posted in PunBB 1.2 show off)

To add it below the header, check out http://www.punres.org/desc.php?pid=206

To create a left menu bar and add it there, check out http://www.punres.org/doku.php?id=tutorials:miniportal

For a lot of other common requests, check out http://punbb.org/forums/viewtopic.php?id=10134

HTH,
Andrew

30

(1 replies, posted in PunBB 1.2 show off)

This site is for a student organization of which I am an alumni.
http://www.wesley.org.vt.edu

It is PunBB 1.2.11 with miniPortal as well as the Calendar, Gallery, and Custom Pages mods.

I extended Custom Pages to do a few extra things...
1. Made one Custom Page the homepage.
2. Optionally link any custom page to any forum using the news feeder from miniPortal.
3. Added FCKeditor to the Custom Pages editor.
4. Set some or all Custom Pages to populate the "Information" block in user-defined order.
5. Allow links in above "Information" menu that just redirect instead of hold content.

The "student" side is open and uses the "Hokie" theme I created and submitted to www.punres.org while the "alumni" side is closed and uses the User Management plugin to add alumni.

The two use separate database tables in the same database.

Let me know what you think!
Andrew

31

(28 replies, posted in Programming)

I remember thinking extra options shouldn't be too hard so I'll work somethin out next week for images (and maybe a hyperlink to product info?) if there's no answer by then ... great work on modding it! Very handy!

-Andrew

32

(28 replies, posted in Programming)

In form.php, right above the line //Sales Tax add this code:

// Custom Desired Delivery Date
    $class = ($class == 'even')? 'odd': 'even';
  echo '<tr class="' . $class . '">
    <td>Desired Delivery Date</td>
    <td colspan="2"> </td>
    <td class="lbl"><select name="del_date" tabindex="' . ($num_products + 2) . '">';

    $day = 30;
    $newTime = 0;
  
  // firstDate is how many days in advance you want the first delivery date
  // showDates is how many days after firstDate you want to show
  $firstDate = 1;
  $showDates = 14;
  
  for ($x=$firstDate;$x<=$showDates;$x++) {
      $newTime = mktime(0, 0, 0, date("m")  , date("d")+$x, date("Y"));
      echo "<option>".date("F d, Y", $newTime)."</option>";
  }
  echo '</select></td></tr>';

Then look for "Enter Your Email Address" and find the </tr> tag after that. Add this row in...

  <tr class="<?php echo $class = ($class == 'even')? 'odd': 'even'; ?>">
   <td colspan="1">Comments</td>
   <td colspan="3" class="lbl"><textarea name="comments" rows="5" cols="30" tabindex="<?php echo ($num_products + 5) ?>"></textarea></td>
  </tr>

That should get your page looking right for the new fields, so all you have to do is add it to the display and email in order.php

Find this code:

$msg .= "Grand Total: $" . $_POST['grand_tot'] . "\n\n";

and under it delete everything and replace with this:

$msg .= "Desired Delivery Date: " . $_POST['del_date'] . "\n\n";
$msg .= "Comments:\n" . $_POST['comments'];
mail($to_address, $subject, $msg, $from);
?>
 
</table>
<p>Desired Delivery Date:<BR><?php echo $_POST['del_date'];?></p>
<p>Comments:<BR><?php echo $_POST['comments'];?></p>
<p>Thank you for your order.</p>
</body>
</html>

That should add it to your email and the display. Oh, it automatically calculates the next 14 dates too so you don't have to edit it every day.

I have a working copy locally I can send if something doesnt go right in the changes but I think that's it.
Andrew

LOL, Since it has to check usernames first, I ended up under the comment "// Are we allowed to change usernames?" adding $pun_user['id'] == $id as someone allowed to change usernames and then just added the form element so it shows up editable smile

anyone know of a way to allow members to change usernames?

What determines the plugin order in the admin area? I'd like it to just be alphabetical if possible...

Thanks!
Andrew

That's ok... the news generator from the miniportal project on the punres wiki is sufficient for what I'm working on ... I added the miniportal news generator functionality to Gizzmo's Custom Pages module and updated the admin interface so you can optionally select a forum when you create a custom page and that seems to be a hit with the non-techie users ... kinda makes a "blog with some intro text" look.

It's all a good excerise in getting into PunBB and the mods a little bit since I'm still new to the site right now smile

Question and comment...

Comment: The "Forum » News" link works fine at the top but at the bottom of the news page it goes to fora.php which is 404.

Question: Is the news.php page a script you wrote yourself or a mod available around here?

Thanks!
Andrew

38

(7 replies, posted in Feature requests)

oh yea, right there on the Index link ... I think it'd make sense as well on profile under the "Show all posts" link but that's just personal preference and easy enough to add that there on my forum ... thanks again elbekko smile

39

(7 replies, posted in Feature requests)

i know this is really old but i was wondering if this is in PunBB anywhere as I need to start tracking all the good stuff I am finding here smile

Thanks,
Andrew

I'd like to see duration or a full time element (start time and duration) for the events calendar part.
I'd also *love* to see weekly or monthly recurring events (maybe I missed this feature b/c I found yearly)

Lastly I posted this at punres but if you set User Groups >> Read board = No for guests guests can still see the calendar. I don't know if that is a bug or not but I know the Gallery mod reads off that to determine access levels.

Thanks,
Andrew

lol, makes me feel good we came to the same conclusion ... pun is so darn easy to use and figure out it's scary!

actually i commented out the change lines in profile.php like elbekko suggested and so the user can't change options now and I figured out in header.php you can change the css link from

<link rel="stylesheet" type="text/css" href="style/<?php echo $pun_user['style'].'.css' ?>" />

to

<link rel="stylesheet" type="text/css" href="style/<?php echo $pun_config['o_default_style'].'.css' ?>" />

so that it reads it from the pun_config table instead of the pun_user table smile

The redirecting page seems to still use the user style but it's just a find replace issue now for $pun_user['style'].'.css to $pun_config['o_default_style'].'.css

Seems to work for me thus far... any thoughts why it wouldn't in the futre?

Thanks,
Andrew

Hmm, I tried that a few different ways but when you submit the page where it is commented out it either submitted a hidden variable or kept the style it was at when the user signed up. I may have goofed something up though so that could be an option I'm just doing wrong!

But I looked at the user table and even though user "guest" is set to Oxygen it is using Xmas for a guest which is what I set in admin so there is some override somewhere for guest so if I track that down and apply it to all I guess I'll be set! Then I'll just comment out the whole area like you said so the user doesn't think they can change it smile

Other than just having one style is there any way to disallow style changes?

I (and by I I really mean a user as I personally dont't care) want to be able to have seasonal styles that change colors and possibly background images around a bit but I want to disable the user profile option to change styles.

Thanks,
Andrew

45

(114 replies, posted in PunBB 1.2 discussion)

hcgtv wrote:

With the PunBB integration, any future articles appear as soon as I enter them on the forum. I know that PunBB wasn't meant to work this way or for that matter most forums, but it would be a nice logical feature to be able to enter future posts or at least for posts with future dates not to appear until the date/time is reached.

This is somewhat limiting because you would have to have cron jobs on your server but here is a thought on an extension/mod..

1. Specify in the admin area the future date, the forum, the topic title, and the topic content and store that with the usename of the mod doing it into a newly created table.
2. Write an external file that reads that table, grabs anything that is the current date, and puts it into the forum as a new post.
3. Run that external file with a cron every night a few min after midnight.

Would this solve your future date problem or am I completely misreading your statement?

46

(5 replies, posted in PunBB 1.2 show off)

I have a standard PunBB going with MiniPortal and some other Mods installed at http://www.teg.name/punbb/ just for testing but the reason I'm sharing here is that http://www.teg.name/punbb/forum.php has some RSS fun where you can display news from another website or 2 or 3 right below your forum list. It is based on a free script from feedforall.com and basically I just updated the templates to play nice with PunBB.

Right now you can specify the following:
How many items to show (or show all)
What template (I have created 2 - one with and one without descriptions)
What URL is the RSS feed at (only required option of course)

Right now it is just a one-line hack (add an include statement) and some new files but it's not very flexible. I may look at making this a real mod so you can specify the above options in the admin area and explore the possibility of allowing it on the view forum and view topic pages for certain forums or topics.  if anyone is interested or let me know if you want it as the hack that it is right now.

Thanks,
Andrew

47

(2 replies, posted in PunBB 1.2 troubleshooting)

Thanks for the info, I'll try to be patient and contain my excitement smile  An excuse to get some sleep I guess wink

48

(2 replies, posted in PunBB 1.2 troubleshooting)

Hi all,

I've seen a lot of links to www.punres.org but haven't been able to access the site. I just got PunBB about 15 hours ago so perhaps it's just down today but I wasn't sure if there was anything special to getting stuff from there or not.

Thanks,
Andrew

http://punbb.org/forums/viewtopic.php?id=10720

Was fixed 2/28/06 with 1.2.11 for anyone finding this on a search smile

50

(71 replies, posted in News)

wow, installed in the morning and already an update in the afternoon smile  glad to see it's being very supported and upgrade was a breeze!

Thanks,
Andrew