Jump to content

Trek15

Members
  • Posts

    49
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Trek15's Achievements

Member

Member (2/5)

0

Reputation

  1. Hmm, but all the other "functions" or whatever are in the parenthesis of apply_filters, like here: return apply_filters( 'sanitize_html_class', $sanitized, $class, $fallback ); So doesn't that mean that apply_filters just is a function that starts the other functions?
  2. Hi guys. As per usual when the official forums of software like Wordpress gives you no help whatsoever i come to the only community that always gave me great help in the past! This time i'm trying to get WP to allow hyphens and underscores in the username. There is one topic in their forum explaining that commenting some code could help, but it didn't for me in the latest version. I have no idea what this code is or how it works (or even if it's there to allow or disallow), but as i've seen many other requests for help for this type of code in this board i try here: /** * Sanitize username stripping out unsafe characters. * * Removes tags, octets, entities, and if strict is enabled, will only keep * alphanumeric, _, space, ., -, @. After sanitizing, it passes the username, * raw username (the username in the parameter), and the value of $strict as * parameters for the 'sanitize_user' filter. * * @since 2.0.0 * @uses apply_filters() Calls 'sanitize_user' hook on username, raw username, * and $strict parameter. * * @param string $username The username to be sanitized. * @param bool $strict If set limits $username to specific characters. Default false. * @return string The sanitized username, after passing through filters. */ function sanitize_user( $username, $strict = false ) { $raw_username = $username; $username = wp_strip_all_tags( $username ); $username = remove_accents( $username ); // Kill octets $username = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '', $username ); $username = preg_replace( '/&.+?;/', '', $username ); // Kill entities // If strict, reduce to ASCII for max portability. if ( $strict ) $username = preg_replace( '|[^a-z0-9 _.\-@]|i', '', $username ); $username = trim( $username ); // Consolidate contiguous whitespace $username = preg_replace( '|\s+|', ' ', $username ); return apply_filters( 'sanitize_user', $username, $raw_username, $strict ); } The wierd thing is that it clearly states that.. "will only keep alphanumeric, _, space, ., -, @." , which it obviously doesn't. The code that i think is what you can modify to allow hyphens and underscores is the one under "//Kill octets". Does anyone have any idea what i could add there to make this happen? Simply commenting out that code for some reason still only allows numbers and letters in usernames during the registration on my website.
  3. I'll try this again. How do you pull the username from the currently logged in user in Joomla 1.7? I believe this is called a "hook" among you coder folk. Kind of embarassing that i have to ask this here since nobody can answer it even in the official Joomla forum. The devs for that software really need to slow down a bit and start finishing up on the documentation before they add even more to Joomla.
  4. TradeDoubler ads have this feature called EPI, Enchaned Publisher Integration, which is an optional way of adding more information to a click/purchase on a banner in a manner of keeping track of which user on your website that actually made the click/purchase. Considering it apparently doesn't need to be that complex, i would like to ask if anyone here would know what Joomla's version would be for the EPI code. This is apparently how it works: EPI requires one parameter, which you append to the TradeDoubler tracking URL. EPI is the parameter, which distinguishes the visitor. The logic behind EPI supposes that you know who the visitor is when he/she clicks on the tracker link. Normally you would have some kind of script that inserts the EPI value, depending on the identity of the visitor, into the tracker link. The EPI parameter does not need to be registered, or created in the TradeDoubler system prior to you appending the EPI parameter to a TradeDoubler tracking URL. TradeDoubler tracking technology will automatically record any EPI parameter you have appended to a tracking URL or banner, however avoid using spaces and punctuation marks in the EPI code. The simple solution is to make a small form of your tracker link. Because the links look something like "http://clk.tradedoubler.com/click?p=XXXX&a=XXXX&g=XXXX" you can also make a form containing all values in the link. These values are sent with METHOD=GET to http://clk.tradedoubler.com. For example: <form method="get" action="http://clk.tradedoubler.com"> <input type="hidden" name="p" value="XXXX"> <input type="hidden" name="a" value="XXXX"> <input type="hidden" name="g" value="XXXX"> </form> If you for example let your visitors type in their e-mail address you can add this to the form: <input type="text" name="epi"> A more interesting part is however this: If you instead want to create an automatic system you can let the visitors log in on your site and let code add EPI values to each ad-link that way. By adding &epi=username for example. This is obviously the Joomla-specific code that i'm looking for. Here is a sample ad-link: <a href=”http://clkuk.tradedoubler.com/click?p(702)a(407311)g(15036) epi(myEpiCode)”>Click here for great offers</a> The "myEpiCode" is obviously where the Joomla-specific code should go. Anyone wanna give it a shot? I'd try your suggestions on my site to see if it gets sent properly to the reports in my TD account.
  5. Hello folks! As per usual when i can't find any help elsewhere i come here. The Joomla forum's coding support is lacking to say the least, while this place always has experienced people interested in helping! I use a flash menu software that isn't coded for Joomla but that has a fully functioning module available for it to make it simple to add it to your Joomla site. The problem is that everyone can see all items on this menu since the items are defined in an XML document and since they thereby don't take any access levels into consideration. This means that i have to create menu items in Joomla first and then add the links to those menus in the custom XML file for them to show up in the flash menu. And if i make any of those menu items inaccessible to guests they see a 404 error page instead of being told to log in when they click it, which i realize is due to the page of such menu items not actually existing since Joomla generates all pages to those with rights to acces them. So, i wonder if anyone knows how you can make those menu items conditional to access levels or user groups in Joomla by placing code around them. I'm not interested in customizing the 404 page. I don't want them to have to see that page at all. And for that i have to hide the menu items from them somehow.
  6. Hehe, yeah, that's what i thought. Thanks anyways.
  7. Thanks. That's very kind of you. So is there like any chance you'd know what the php code would look too? Hehe. If i'll have to build this myself it certainly wouldn't feel too eager to spend weeks learning a new coding language to make something that an experienced hobbyist could make in a couple of hours.
  8. Thanks Adam. I looked around but couldn't find anything interesting. The thing is that since english isn't my native language i don't really know what to search for. "Directory" seems somewhat what i'm looking for but i guess google wants me to be more specific than that. The thing is that i've been a member of a website like the one i want to build long ago so i know that it's out there somewhere. I hate it that every time i have a good idea for a website i'm always limited in finding what i need to pull it off due to my limited vocabulary.
  9. Hey folks. I'm not native to English. I would like to create an interactive list-website with... well i don't even know what it's called, which is why i need to explain this and see if you guys perhaps know what i'm looking for! Ok, so, anyone's supposed to be able to register and login to submit something to the list in mind. These submissions however are only supposed to be visible to the author of the website (me) and the user who submitted them until i choose to make them public. Each user is supposed to be able to login and check on the "status" of their submitted items in their account. These items are supposed to be case-sensitive, so that when a user enters the very same name for an item as an already existing item (whether the existing item is showing on the public list or still is hidden to anyone but the author and respective user), the status for that already existing item gets bumped up in number of times submitted. So each item on the list is supposed to be able to be submitted several times but only from different users (no duplicates from the same user), and when this happens every user who has submitted the same item should be able to see how many times this item has been submitted in the already mentioned area in their account, and this number should also be visible on the public list. It would also be good if i could make it automatic for items to enter the public list when they have reached a certain number of times submitted so i don't have to do this manually all the time. I'm not sure what to do with the description of items on the list when they have been submitted with a description by multiple users. Perhaps it would be possible to see a list of all descriptions by all users by hovering the mouse over, or perhaps clicking a + to extend the list of descriptions? So it's kind of a simple list but with a more or less advanced uh... well, function for seeing the status of something submitted. lol. I guess i could compare it to the shopping cart in an online store. A customer can sign in and check the status of their orders whenever they want. It's plain practically straight-forward, but i have no idea what kind of software that could do this. I'm only really experienced with forum software and it doesn't seem like a forum would be the optimal way to do this list in since i don't know any forum software nor mod for a forum software that can do the kind of technical stuff i'm looking for with the submissions and the dynamic status and all that. I would very much appreciate any help!
  10. Ha, that actually did it. I can't believe IE don't even accept this. Thanks buddy!
  11. Not really my code but here's the head and some more of the index.php document. The line at the very bottom is an example that doesn't work in IE for some reason. (The color of that font is still black) ########################################################################## */ // important data include include("_mysql.php"); include("_settings.php"); include("_functions.php"); $_language->read_module('index'); $index_language = $_language->module; // end important data include ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="description" content="Clanpage using webSPELL 4 CMS" /> <meta name="author" content="webspell.org" /> <meta name="keywords" content="webspell, webspell4, clan, cms" /> <meta name="copyright" content="Copyright © 2005 - 2009 by webspell.org" /> <meta name="generator" content="webSPELL" /> <!-- Head & Title include --> <title><?php echo PAGETITLE; ?></title> <link href="_stylesheet.css" rel="stylesheet" type="text/css" /> <link href="tmp/rss.xml" rel="alternate" type="application/rss+xml" title="<?php echo getinput($myclanname); ?> - RSS Feed" /> <script src="js/bbcode.js" language="jscript" type="text/javascript"></script> <!-- end Head & Title include --> <!-- standard Design stylesheet --> <style type="text/css"> body { margin: 5px 0 10px 0; padding: 0; font: 10px Verdana, Arial, Tahoma, Helvetica, sans-serif; color: #000000; background-image: url(images/bg.gif); } div#container { width: 1000px; margin: 0 auto; padding: 0; text-align: left; } div#head { width: 1000px; height: 12px; background-color: #AA3333; } div#content { width: 1000px; margin: 0; background-color: #333333; } div#content .cols { float: left; width: 800px; } div#content .col1 { float: left; width: 200px; border-right: 1px solid #C60; } div#content .col2 { margin-left: 200px; text-align: justify; } div#content .col3 { margin-left: 800px; border-left: 1px solid #C60; } div#footer { clear: both; height: 50px; width: 1000px; text-align: center; background-color: #666 } hr.grey { height: 1px; background-color: #C60; color: #C60; border: none; margin: 10px 0 4px 0; } .nav { color: #36befc; font-weight: bold; } </style> <!--[if IE]> <style type="text/css"> div#content .col2 { width: 74%; } div#content .col3 { width: 19%; } hr.grey { margin: 3px 0 3px 0; } </style> <![endif]--> <!--[if lte IE 7]> <style type="text/css"> hr.grey { margin: 3px 0 -3px 0; } </style> <![endif]--> <!--[if gte IE 8]> <style type="text/css"> hr.grey { margin: 3px 0 3px 0;} </style> <![endif]--> <!-- end standard Design stylesheet --> </head> <body> <div id="container"> <div id="head"></div> <div id="content"> <div class="cols"> <div class="col1"> <div style="padding:10px;"> <!-- clanname --> <span style="font-size:19px;"><font color="#F00">« <?php echo $myclanname ?> »</font></span> <!-- end clanname --> <!-- quicksearch include --> <?php /*?><?php include("quicksearch.php"); ?><br style="line-height:1px;" /><?php */?> <!-- end clanname --> <br /><br /> <!-- articles include --> <?php /*?><b><?php echo $myclanname.".".$index_language['articles']; ?></b><br /> <?php include("sc_articles.php"); ?><?php */?> <!-- end articles include --> <!--<hr class="grey" />--> <!-- upcoming events include --> <b><font color="#DDD">Upcoming Events:</font></b><br />
  12. I'm working with a php document in which i have made a few lines of text within some regular HTML font-color tags and all browsers except all versions of IE displays that color. Is this due to the PHP document or something? I have no idea what to do or try here so i hope that you perhaps can help me find the problem by asking me what to check for or something.
  13. Well, that also makes it a lot of extra work when you just want to change ONE page. There are many websites that doesn't consist of lots of pages.
  14. Ah.. as i feared then; there's no practical way of doing this. I don't understand why tables had to turn into such little devils to use according to those who decide things like these. Seems like all the easy ways of doings things are being phased out. Reminds me of the days when we had to adapt to a separate CSS file taking care of colors, fonts, styles etc. Am i the only one who happen to believe it's always easier to just add everything directly in the tags? SSIs just made everything unnecessarily complex. Flame shield on? I'm on a PHP community here after all... lol
  15. I know how to position an element so that it's fixed. But what i want to find out is if i can load the content above the fixed element separately from the fixed element, as if they were in separate frames, but without using frames. Check this example. If you click the Forum and Chat buttons, they will load in the content frame and the footer will remain loaded in the browser. The footer doesn't re-load with the page-change. That's what i wonder if i can do without using frames.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.