page switcher?
I think thats called a hyperlink, but maybe I'm missing something.
You are not logged in. Please login or register.
PunBB Forums → Posts by MadHatter
page switcher?
I think thats called a hyperlink, but maybe I'm missing something.
whats the error? most times that helps sort out the problem.
it starts around the last line of header.php with the ob_start() and ends on the first few lines (where it actually replaces the output buffer)) of footer.php.
I can get in.
it wouldnt let me login until I allowed the site to run java script (i use noscript). make sure users have javascript enabled... when you submit the login, it checks to see if the login stuff was entered correctly, if it wasnt it should redirect you like it is...
I've been working a lot with SOLR (which an online version of the lucene search engine) here at work lately. its written by c|net, and for a java app, is actually pretty nice . you update its index (in this case a blacklisted ip address) and query it over http / xml so it would be a really good candidate for a blacklist server. our instance has like 100 million documents stored and runs at google speeds. it would actually be a pretty negligible addition performance wise assuming the blacklist server stayed up.
there are more than one type of captcha. the captcha project has like 3 or 4 types. personally I find the distorted text captcha the most annoying.
add some custom tag to your main.tpl file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html dir="<pun_content_direction>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
<pun_head>
<your_content>
</head>
then in header.php (right after the parts I previously posted)
// START SUBST - <your_content>
// determine the page context here
if (eregi("viewtopic.php", $PHP_SELF)) {
// if you need to find the id do so here
if($_GET['id'] && $_GET['id] == 3) {
// if you want to have--for instance--different styles for each topic, you can define
// custom style sheets for each, and place the link to that in your lang files
$tpl_main = str_replace('<your_content>', $lang_common['viewtopic_custom_header'], $tpl_main);
}
}else if(eregi("viewforum.php", $PHP_SELF)) {
// change your custom header based on a viewforum page
}else if(eregi("profile.php", $PHP_SELF)) {
// change your custom header based on a profile being displayed
}
// END SUBST - <your_content>
for the $lang_common['viewtopic_custom_header'] bit to work you need to do the following:
in lang/YOUR_LANG/common.php
go to the last line, make sure there's a comma after the last quote mark:
'Posted' => 'Posted', // The date/time a topic was started
and after that line add:
'viewtopic_custom_header' => 'your custom html headers here'
in header.php (for 1.2.12 atleast) the pun tags from the templates are replaced with whatever they represent. you can add replacement functionality just like that for your own things.
// Load the template
if (defined('PUN_ADMIN_CONSOLE'))
$tpl_main = file_get_contents(PUN_ROOT.'include/template/admin.tpl');
else if (defined('PUN_HELP'))
$tpl_main = file_get_contents(PUN_ROOT.'include/template/help.tpl');
else
$tpl_main = file_get_contents(PUN_ROOT.'include/template/main.tpl');
// START SUBST - <pun_content_direction>
$tpl_main = str_replace('<pun_content_direction>', $lang_common['lang_direction'], $tpl_main);
// END SUBST - <pun_content_direction>
add something like the last 3 lines to your header.php where you replace the '<your_tag>' with your custom stuff based on PHP_SELF and whatever other query string parameters you need.
my spammers never used the same ip address. I'd get about 10 spams a day on my site, and it would be the exact same messages from 10 different ip addresses. I had added a spam ban script that would automatically htaccess "deny from ip" based on message content but it didnt do much good at blocking them unless I banned on the first octet of the ipaddress.
You have to specify the table when working with multiple tables in a query.
thats only required when you are referencing columns that multiple tables share (like id). it really does make it much easier to (read /) maintain later on (or if you're looking at it for the first time).
just because you can does not always mean you should.
i see it being hugely (is that even a word) useful as a development (or office for the non-developer) environment, but not ever as a desktop os (unless you are like my wife where browsing the internet and reading email is the total sum of your computer usage). can you imagine what you and it would have to have to be able to run a game like battlefield or oblivion on that type of platform?
its a cool concept thats been around for a long time. i dont see anyone doing it well enough to catch widespread fire.
damn that karma mod... I posted in your forums once and got a -2.
I'd rather have built-in absolute urls (as is in 1.3) then have to replace the entire output buffer with static urls. then again, I thought thats what this topic was about.
could you pull a dev version archive of that so we dont have to download each file individually over your web viewer?
I added the bf2 rank stuff to the user profile on my site (click my name in one of the forum posts to see it). I'm going to add the rank image to my viewtopic level pages like an extra avatar built in (with probably an option to display it in threads like the signature).
off to sleep. I'll post the mod for it later.
ok I got it to work.
question though, you're creating an array of posted stuff based on view of the profile. I added my custom thing to the essentials view, and added my post variable name to the extract_elements list, but it still does not populate the $form array w/ the posted element. if I explicitly add it:
$form['mycolumn'] = $_POST['mycolumn']?$_POST['mycolumn']:"NULL";
right after the array is built (line 675 of profile.php) it works, but this seems hackish. the update section seems to be out of scope of that section, is there some other way to get my column into the update using the conventions you've defined?
thanks.
I'm trying to add some stuff into the users profile. looking at profile.php around line 843 I see what looks to be the update command for the users table. am I just not looking close enough or is this where you're breaking out the form values for the insert into the database? guess not because my data isnt being updated.
any help? thanks.
I'm about 3/4 of the way through a total stats library for bf2.
a punbb mod like that sounds like a great idea. it would be really easy to do w/ that library (even in its current unfinished state).
I'll post something on my site (and here too) when I get it done.
yea I added the copyright at the bottom before I posted this morning.
i've used phpnuke and phpbb for years and have avoided the "google hackers" by changing the powered by taglines on my sites. as a software engineer myself I can appreciate credit where credit's due (I only require it in source code or html comments) and I wasnt intentionally trying to misrepresent.
Rickard, I do have to say that I typically dont enjoy working with other people's code. punbb is an intuitive codebase to work with. nicely done!
wow. a lot of friendly folks around here...
like I said...
havent got it completely tweaked yet, but it was pretty painless.
guess folks can click but not read. the pre-canned <pun_footer> is way too long for me. I don't get the impression that I wrote the forum. anyone who has written a line of code would know that writing your own is crazy. anyone who's seen punbb knows its style, which i've kept. and the bottom line is, its a presonal blog. were I selling something, promoting something, or in otherwise gaining anything from its use, I'd def. agree. I plan on putting credit, just one of those things I havent done because I dont plan on using the huge pre-written footer.
sorry for pissing so many ppl off with my need to sleep last night.
havent got it completely tweaked yet, but it was pretty painless.
PunBB Forums → Posts by MadHatter
Powered by PunBB, supported by Informer Technologies, Inc.