V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
joynic
V2EX  ›  WordPress

有没有熟悉BuddyPress的?

  •  
  •   joynic · 2011-10-11 16:57:37 +08:00 · 4038 次点击
    这是一个创建于 4574 天前的主题,其中的信息可能已经有所发展或是发生改变。
    问个关于url优化的问题,比如默认发布中文帖子的网址是这样的:
    http://www.test.com/groups/7%E7%9A%84%E5%/forum/topic/%E9%BB%91%E5%B7%B7%E7%9A/

    其中7%E7%9A%84%E5%是指群组名称,%E9%BB%91%E5%B7%B7%E7%9A是指帖子名称。

    如何优化好看点,比如:

    http://www.test.com/groups/topic/3

    “3”指帖子ID

    搜索到这篇帖子:http://www.wheatv.com/1183.html/

    但是貌似有些问题。而且最终结果实在不是我想要的形式。

    谢谢。
    1 条回复    1970-01-01 08:00:00 +08:00
    joynic
        1
    joynic  
    OP
       2011-12-20 18:08:08 +08:00
    不想再开帖子。。。遇到新的问题了。
    Buddypress默认的标题结构是 122 | 212 | 2123
    中间用|隔开。但我的worpdress是用短横线连接的。我修改bp-core-filters文件里的这句:
    if ( !empty( $bp->displayed_user->fullname ) && !is_404() ) {
    // translators: "displayed user's name | canonicalised component name"
    $title = strip_tags( sprintf( __( '%1$s | %2$s', 'buddypress' ), bp_get_displayed_user_fullname(), __( ucwords( bp_current_component() ), 'buddypress' ) ) );

    我把|改成-,最后出来是个长的横线。。。请问这里应该如何修改?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2970 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 03:10 · PVG 11:10 · LAX 20:10 · JFK 23:10
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.