You are not logged in. Please login or register.
Active topics Unanswered topics
Search options (Page 7 of 13)
Pages Previous 1 … 5 6 7 8 9 … 13 Next
Connorhd wrote:i think the only javascript feature is the submit button which is disabled when you click it, but works fine without javascript
You've also got your html to xhtml feature and your submit button disabler feature. And, some mods use JavaScript to work properly. So, if you don't mind the submit button not being disabled when clicked, your XHTML being invalid, and your mods not working right (if said mods use JavaScript), then it works fine without JavaScript.
my modded header.php
//Default Style:
if (!$_COOKIE["swzc_style"]) {
$styletest = "Brown";
}
//If cookie is set, get information:
if ($_COOKIE["swzc_style"]) {
$styletest = $_COOKIE["swzc_style"];
}
*********************the tpl loader script and then some other stuff is here*********************
<link rel="stylesheet" type="text/css" href="style/<?php echo $styletest.'.css'; ?>" />
that put this somewhere with the little sql thingy
<?php
$action = isset($_GET['action']);
if (!$action) {
$action = "";
}
else {
$action = $_GET['action'];
}
if (!$action) {
?>
<FORM action="<?php print ($PHP_SELF); ?>?action=setstyle" method="post">
<SELECT name="styledrop">
<?php
$result = $db->query('SELECT * FROM '.$db->prefix.'table swzc_styles') or error('ERROR..', __FILE__, __LINE__, $db->error());
while ($styles = $db->fetch_assoc($result))
{
echo '<option value="'.$styles['name'].'">'.$styles['name'].'</option>';
}
?>
</SELECT>
<INPUT type="submit" value="Send">
</FORM>
<?php
}
if ($action) {
$style = $_GET['styledrop'];
}
if ($action == 'setstyle') {
$now = time();
setcookie(swzc_style, $now + 31536000, $style); //expires in a year..
echo 'Thank you, your design has been chosen!';
}
if ($action && $action != 'setstyle') {
echo 'Invalid Action!';
}
?>
Provided I have styler.php included in the main.tpl (and even if I don't), it spits out a blank page! What's wrong? And, yes, I do have a style called Brown on my installation.
Also, your HTML isn;t valid XHTML 1.0 strict: element names are case-sensitive (i.e. <option> and <OPTION> are 2 different things). Sorry about the triple post.
Ok, now let's say I have the names of each style in my DB. Instead of having
<OPTION value="green">Style1</OPTION>
<OPTION value="pink">Style2</OPTION>
in there static, I want it to be generated dynamically from the list of names.
Example:
swzc_styles
========name========
Green
Pink
(End DB Table row listing)
<option value="**name**">**name**</option>
where **name** is the contents of field name on the row in table swzc_styles. Please note I'm using MySQL.
Here's a good thread about it:
adding bbcode by Ataxy [ 1 2 ]
What mod are you wanting to make?
Oh. Nevermind. If only I had known about/remembered that. But maybe add an option to remove each/all posts right from that screen.
What about something where the user could see their subscription(s)?
I have a somewhat related thread here. Change Styles
Read me first
Okay, now that you've read that, let me say this:
I want to allow a user to change their preferred style via a drop-down box. When a user selects the style from the drop-down box (which is in a PHP file called styler.php in the root directory which is included into the main.tpl file) and hits "Change" (or whatever the Submit button says), it would set a cookie containing the preferred style. The header.php file would load the preferred style from the cookie instead of the user profile. If the style doesn't exist, or if no style is set, it would set a cookie containing the default style (which is already set in the forum's config). I'm not too good at PHP (yet, anyways), so any suggestions would be nice.
Edit: (Edited for clarity.)
Where do they find all that space? 1 terabyte of free space per account?
And, back onto the subject of blogs, here's mine: The Scotty
Connorhd wrote:Speaking of Google, they say they don't index pages with id=32754
where?
...
Webmaster Guidelines
...
Technical Guidelines:
...
? Don't use "&id=" as a parameter in your URLs, as we don't include these pages in our index.
...
©2005 Google ...
Source: http://www.google.com/intl/en/webmaster … lines.html
Nibbler(cpg) wrote:...
Anyone who objects to Greasemonkey being used on their site needs to take time to consider the nature of the Internet.
Yes, but....
I've considered that. Oh, and thanks for telling me about the audioscrobbler thing.
Well, when you delete a post, your post count is reduced, isn't it?
_arse wrote:Whilst toying with HTML Escape characters in PunBB i found:
1
Having a # in your nickname appears to screw things up.
No immediate problems # nicknames can still be deleted my Admins.
The only problem i am able to find is # nicknames can't create posts
Bad request. The link you followed is incorrect or outdated.
2
Also, it is possible to register a nickname that appears to be exactly the same as one that is already registered using HTML Escape Characters. Whilst the 25 Chars limit prevents anyone from registering 'Administrator' it could create confusion and be used to scam / trick people.
Here's an example:
the username "Jack" is registered, we want to register the same nickname..so we register "Jack"(WRITTEN IN HTML ESCAPE CHARACTERS) whilst to us this looks mostly like garbage our web browser will interpret it as "Jack". However due to the above bug you will be unable to actually POST because that is impossible( i think ) with #'s in your nickname.
3
It is possible to get past the PunBB censorship by using HTML Escape characters. For example if we wanted to say "fack" on a forum where this was forbidden we could simply say "fack"(WRITTEN IN HTML ESCAPE CHARACTERS)
4
#hello# made one post, yet #hello#'s profile said that #hello# made three posts.
Yesterday it wouldn't work. Today, it works partly.
There's another reason why Webmasters may not like it. Or anything else that removes ads.
Yes, it is possible in 1.2.5.
Maybe Firebird SQL support could be added in PunBB 1.3?
Why is viewforum.php?id=12 for example in there twice?
Posts found: 151 to 175 of 309
Pages Previous 1 … 5 6 7 8 9 … 13 Next