WordPress.org

Ready to get started?Download WordPress

Forums

With WP I waste time triying to make things that should be easy to do (29 posts)

  1. ganzua
    Member
    Posted 7 years ago #

    With WP I waste a lot of time triying to make things that should be easy to do and I always finish all puzzled;

    I can't set a hand made static page as my blog front page so I can show what is new. There are always conflicts with "the more" or with index.php.

    http://wordpress.org/support/topic/118764

    I can't make a template in my theme folder for register.php, login.php and profile.php so the users can see the same interface all over the web. This is nosense.

    http://wordpress.org/support/topic/118618

    I can't insert a forum with the same logins, headers, sidebar and whatever needed as the blog. Tried bbpress but it requires hackering that I can't deal with, plus it has not all the features that a forum should have (phpbb, vBulletin).

    I'm always making questions in the wordpress.org forum that are unanswered or keep unsolved. Many times I'm refered to codex entries that I have already read and plugins that I have already tried because I did my search before asking.

    I don't like wordpress plugin policy; you can't plugin everything. You can't develop a theme that is +20plugins dependent. I wish I could incorporate plugins code to my themes.

    And last but not least, after making a lot of modification, upgrading is a pain or almost impossible because you have to remake the whole site.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    I can't set a hand made static page as my blog front page so I can show what is new. There are always conflicts with "the more" or with index.php.

    Options->Reading->Front page displays: A static page. You need to create two "Pages", one for the static page, and one with a normal Loop for your main blog entries page. You may need to make special Page Templates for these. Then you set which Pages are which here. Okay, so it's not obvious, but it works fine.

    I can't insert a forum with the same logins, headers, sidebar and whatever needed as the blog. Tried bbpress but it requires hackering that I can't deal with, plus it has not all the features that a forum should have (phpbb, vBulletin).

    bbPress is the only forum software capable of this, as far as I know. However, your criticism should be directed at the forum softwares, not at WordPress. If they want to integrate, they're free to do so.

    As far as bbPress's features go, complain on the bbPress forums. Not here.

    I'm always making questions in the wordpress.org forum that are unanswered or keep unsolved. Many times I'm refered to codex entries that I have already read and plugins that I have already tried because I did my search before asking.

    Perhaps your questions are unclear? I have no answer for this except to say that if this sort of thing happens to you often, then maybe you should examine how your questions are worded instead of placing blame on everybody else?

    I wish I could incorporate plugins code to my themes.

    You can. Add them to the theme's functions.php file. That file is loaded after plugins are, but it can use all the same bits as plugins can. Mostly. Anything you can do with a plugin you can probably do in functions.php. Just make sure that it does not produce any output by default... Should be all hooks and filters and functions and such.

    And last but not least, after making a lot of modification, upgrading is a pain or almost impossible because you have to remake the whole site.

    Generally it's pretty straightforward, if you don't modify any core code. There are really very few reasons that you would actually need to modify core code. Every once in a while there's something, but in that case you should also put in some kind of ticket or patch so that it can be done without the modification.. Like using a filter or something. This is how things like this get added... somebody has a need, puts in a ticket, it gets done or decided not to be done, depending. Without a problem ticket in trac, nothing changes.

  3. ganzua
    Member
    Posted 7 years ago #

    Thanks for your answers Otto42;

    "You can. Add them to the theme's functions.php file. That file is loaded after plugins are, but it can use all the same bits as plugins can. Mostly. Anything you can do with a plugin you can probably do in functions.php. Just make sure that it does not produce any output by default... Should be all hooks and filters and functions and such."

    I didn't know anything about this. Can I copy the plugin code to the theme's functions.php file and that's all? Will the plugin work when I call its functions?

    ...

    "Options->Reading->Front page displays: A static page. You need to create two "Pages", one for the static page, and one with a normal Loop for your main blog entries page. You may need to make special Page Templates for these."

    That's what I did in my current web but "the more" doesn't work in wordpress static pages, so by now I have to show the whole last entry when I wanted to show just a few lines. I tried The excerpt but I didn't achieve wat I wanted.

    By the way, I've found that in 2.2 the more is not showing
    more_link_text ok. I thought it was a char set issue but I think it is not becasue I didn't use any tick or symbol

    <?php the_content('more_link_text - > not working', strip_teaser, 'more_file'); ?>

  4. ganzua
    Member
    Posted 7 years ago #

    Otto42;

    "bbPress is the only forum software capable of this, as far as I know. However, your criticism should be directed at the forum softwares, not at WordPress. If they want to integrate, they're free to do so."

    You're right. I just wanted to suggest to join the both projects or offering a forum feature with wordpress. Why? Because I can't integrate the logins with anyother forum.

    Just a suggestion :)

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    I didn't know anything about this. Can I copy the plugin code to the theme's functions.php file and that's all? Will the plugin work when I call its functions?

    For simpler plugins, yes. For more complicated ones, no. It really depends on the plugin. While any given plugin can always be reworked to be in a theme's functions.php file, the reworking may not be as simple as copy and paste. This is advanced theme authoring stuff, and if you want to do this, you need to understand PHP and WordPress pretty well.

    That's what I did in my current web but "the more" doesn't work in wordpress static pages...

    I still don't know what "the more" is, but I'd prefer it if you answered my post in your other thread on this topic instead of answering here. Keep the topics separate.

  6. ganzua
    Member
    Posted 7 years ago #

    Otto42;

    "Generally it's pretty straightforward, if you don't modify any core code. There are really very few reasons that you would actually need to modify core code."

    Well, I can expose at least one reason; lenguages templates are not working ok and in some cases I have to translate by hand core files.

    Another reason; files that are not referred to the theme; register.php, login.php and profile.php

  7. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    What's the problem with languages? Lots of people use the language and localization files with no issues.

    http://codex.wordpress.org/WordPress_in_Your_Language
    http://codex.wordpress.org/Installing_WordPress_in_Your_Language
    http://codex.wordpress.org/Translating_WordPress
    http://codex.wordpress.org/Files_For_Direct_Translation

    You're making all these claims, but not giving any specific details. If you find a specific problem, post that problem. Just saying "it don't work" is not helpful or useful, and will likely just get you ignored.

  8. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Another reason; files that are not referred to the theme; register.php, login.php and profile.php

    True. Except that login and register are both actually located in wp-login.php. And it's possible, although not simple, to add functions to the theme's functions.php file that will add to the login/register forms enough to change the layout a lot, using CSS. Use the login_head and login_form action hooks.

    But most of the admin interface is not directly skinnable or themeable, no.

  9. ganzua
    Member
    Posted 7 years ago #

    "What's the problem with languages?"

    "Just saying "it don't work" is not helpful or useful, and will likely just get you ignored."

    I know those codex entries.

    Well, yesterday I translated 2.2 to another lenguage, file by file because the .mo and.po files for that specific language didn't translated everything.

    I din't take note of what was missing, sorry. For instance; date format; the language files translates months and days names but the format can't be adjusted ok even from the admin control panel options. You have to change every php file where appears the date.

  10. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    For instance; date format; the language files translates months and days names but the format can't be adjusted ok even from the admin control panel options. You have to change every php file where appears the date.

    I don't understand. This doesn't require changing core code. The date format is always either in the theme or in the admin options panel. The internal formats used should never be changed, as it relies on those. But those don't get displayed directly anyway.

  11. ganzua
    Member
    Posted 7 years ago #

    I didn't take note of everything I changed.

    Another classic one of translation is the "comments off". I couldn't translate in 2.2. In previous versions was in

    wp-includes/comment-functions.php
    Line 91
    function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off')

    In 2.2 I just coudn't find. Translation files did not translate that 'Comments Off'.

    Anyway. Languages are not the point. The point is that when you modify core files, then upgrading can be very difficult.

  12. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Another classic one of translation is the "comments off". I couldn't translate in 2.2. In previous versions was in

    wp-includes/comment-functions.php
    Line 91
    function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off')

    That is a template tag. Somewhere in your template is a call to the comments_popup_link function. By changing that call to have the parameters you want instead of those texts, you can translate these texts in the theme itself, there's no need to modify core or language files.

    The point is that when you modify core files, then upgrading can be very difficult.

    Exactly why you should avoid modifying core files. There are almost no cases where you *have* to modify core files.

  13. glowlite
    Member
    Posted 7 years ago #

    hmmmm .......

    If you hack away at the core files why would future upgrades be an issue? I mean, why would you want to change (upgrade) a customized website? Other than security issues.

  14. ganzua
    Member
    Posted 7 years ago #

    For simpler plugins, yes. For more complicated ones, no. It really depends on the plugin. While any given plugin can always be reworked to be in a theme's functions.php file, the reworking may not be as simple as copy and paste. This is advanced theme authoring stuff, and if you want to do this, you need to understand PHP and WordPress pretty well.

    I tried this method and after modifiying functions.php I get an error whenever I try to activate any pluggin. The browser shows; warning I can't modify headers in functions.php and another similar warning for pluggable.php.

  15. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    The browser shows; warning I can't modify headers in functions.php and another similar warning for pluggable.php.

    Like I said, functions.php must have *NO* output. The first line must be <?php and the last line must be ?> and there must be nothing outside of these. Any kind of whitespace at the beginning or end of functions.php will break your site.

  16. ganzua
    Member
    Posted 7 years ago #

    "Like I said, functions.php must have *NO* output."

    What do you mean exactly? no spaces?

  17. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    No, I mean exactly what I say: no output. It must not directly produce any output of any kind: spaces or otherwise. Everything in it must be in functions or must be adding action hooks or what have you. Plugins are the same way, they must also produce no output. However, plugins generally don't break your site when they do produce direct output.

    If you don't know PHP, you probably should not be trying to do this.

  18. ganzua
    Member
    Posted 7 years ago #

    well, the plugin I wanted to use has output so I have to stick to the plugin folder again.

  19. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    The plugin has output? Then it would cause problems too. Not the same problems, but it would still cause problems.

    Very few (almost no) plugins produce output on load. They usually only produce output when the plugin is called upon. The functions.php file is the same way.

    Here's an example:

    <?php
    function testing() {
    echo "Hello world!";
    }
    ?>

    That functions.php file produces no output. It defines a function only. If you call the function, then you produce output, but it's not from the functions.php file, it's from the calling file.

    See?

  20. ganzua
    Member
    Posted 7 years ago #

    Yep, thanks for the explanation. I tried again and I messed the whole installation again. Probably my fault :(

    Regarding the register.php, login.php and profile.php what I mean is to achive the same login you have in this web;

    http://www.babyquestions101.com/signup/

    The login screen is fully integrated in the custom theme.

    Do you know how to call the header, sidebar and footer in wp-login.php?

    and by the way, this would be quite easy if register.php, login.php and profile.php had a template in the themes folder.

  21. ganzua
    Member
    Posted 7 years ago #

    and BTW; in case you want to check, the plugin I tried to add to functions.php is this one->

    http://alexking.org/projects/wordpress/plugins/popularity-contest.zip

    perhaps is too complex?

  22. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    That site made a Page with a form on it. Also, that form is to register for their forum software, which doesn't appear to be part of WordPress (unless it's bbPress.. can't tell).

    and by the way, this would be quite easy if register.php, login.php and profile.php had a template in the themes folder.

    For technical reasons, that's extremely difficult to do, and it's also undesirable. With WordPress, you generally only let people register if they are going to be writing on the blog themselves. There are exceptions, but most blogs do not allow user registrations.

  23. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Why would you want to forcibly include a large, major plugin like AK's popularity contest into the theme, anyway? I can see there being reason to include a reference to it in the theme, in case the user of the theme has it then they get extra features, but taking somebody's plugin like that and including it in the theme seems like major overkill.

    Anyway, all you really have to do, usually, is to include it from the functions.php file. Copy and paste is not entirely necessary.

    A better way, if you want the theme to be aware of the plugin and act accordingly, is to do something like this:

    if (function_exists('akpc_most_popular_in_cat') {
    akpc_most_popular_in_cat();
    } else {
    // do something else
    }

    This way, your theme is aware of that plugin, and it will act correctly when the plugin is active. Deactivating the makes it not reference it anymore, since the function won't exist anymore.

    This is the usual way to make themes "plugin-aware". And then people generally only bother to do that when they make the theme available for other people to use.

  24. ganzua
    Member
    Posted 7 years ago #

    "For technical reasons, that's extremely difficult to do, and it's also undesirable."

    -> I have no idea about how difficult it could be, but I think that from the user point of view it is desirable. At least I do desire! Developers cold set a workaround or anything, I don't know.

    "That site made a Page with a form on it. Also, that form is to register for their forum software, which doesn't appear to be part of WordPress (unless it's bbPress.. can't tell)."

    -> well, we have a point here, thanks fir the idea. Is there anyway I can include a login in wordpress page? I could point all the login links to that page.

    "Why would you want to forcibly include a large, major plugin like AK's popularity contest into the theme, anyway? "

    -> because my theme it is not only for a simple blog, it is acting as cms and I want even further functionality. I get functionality from plugins. My theme, when finished, will be depending on 10-20 plugins and on the creation of several wordpress pages. It will be not a just one click installation.

    I have another idea for developers; "embedding plugins in themes" :)

  25. ganzua
    Member
    Posted 7 years ago #

    Otto42;

    I succesfully included a plugin in functions.php!!!!!!

    Many thanks for the tip! Unfortunately I can't include every pluggin I want to include but it is a step up.

  26. ganzua
    Member
    Posted 7 years ago #

    would it be possible to create a static page with the login, register and profile forms?

  27. ganzua
    Member
    Posted 7 years ago #

    Is there any place where register.php, login.php and profile.php files are explained. I can't find them in the codex.

    I tried to insert "get the header", "get the footer" and sidebar in login.php and it works.

    Then I removed references to admin style sheet so it only reads my custom theme style sheet and it is almost working. I still have to remove things that but I don't know exactly which tings.

    Any literature on register.php, login.php and profile.php files?

  28. ganzua
    Member
    Posted 7 years ago #

    register.php and login.php solved :)

    "For technical reasons, that's extremely difficult to do, and it's also undesirable."

    ->

    After having login.php fully integrated in my custom them (I didn't upload yet for you to check) I totally disagree.

    It is quite simple and it doesn't require any serious code change.

    The only problem is the one I stated in my first post in this thread; you have to waste time figuring it out how to do it.

    And I still believe this is a nosense. Think in phpbb, vBulletin, drupal... all of them have full theme integrated login pages/forms.

    Well, just my own personal opinion :) Now I go for profile.php

  29. arthaseo
    Member
    Posted 6 years ago #

    hi

    i use wp with bbpress and u know wot ? i dont hv to customise any thing on bbpress for it to look same. (Except for few theme's u hv to add sidebar to bbpress)

    refer http://bbpress.org/blog/2006/09/simpler-integration-with-wordpress/

    http://www.adityanaik.com/integratepress-part-i/

    what i see bbpress is a simple forum, yet to hv lot of features of other forums, but it is improving and lot of plugins been developed quickly.

    did you know tht u can customise register page etc.

    but it has to b done on wordpress side n not template side.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.