Summary of changes to common problems in power by Dedecms Dedecms

Source: Internet
Author: User
Tags md5 encryption
Newbie FAQs, this post was issued earlier in the 3.1 official version. Some issues have been corrected, but can still be used as a reference for modification or learning
Please take a bit of patience to read this, many people have encountered these problems. Why should we keep on posting?
In addition, read this please go to your own backstage watch template tag Reference!! Especially arclist the parameter description of this tag!!
Think more about the problem, more test the mark, learn to be their own, learn, who can not help you!!
Add a little: Many tags can refer to the system's default template and template area of some good templates, see more tags to understand the use of each tag,
If you have a post below: Thank you for Dede's Pao Reef.
3.1lit the latest version when the first column is the final list column, make the list display its subordinate column of the article modification
include/inc_arclist_view.php
80 lines:
$addSql. = "and (typeid= '). $this->typeid." ' or typeid2= ' ". $this->typeid." ') ";
Change to:
Added to solve the problem that the parent list does not call the downlevel list
$ssid = Typegetsunid ($this->typeid, $this->dsql);
$ssid 2 = str_replace (' typeid ', ' Typeid2 ', $ssid);
End of Added
$addSql. = "and (typeid= '). $this->typeid." or ". $ssid." or typeid2= ". $this->typeid." ' or ". $ssid 2.") ";//This sentence has also been modified
This section above is used to solve the paging problem
include/inc/inc_fun_spgetarclist.php
Start with Line 70:
if ($ridnum >1) {
$tpsql = "";
for ($i =0; $i < $ridnum; $i + +) {
if ($tpsql = = "") $tpsql. = "and (". Typegetsunid ($reids [$i], $dsql, ' arc ');
else $tpsql. = "Or". Typegetsunid ($reids [$i], $dsql, ' arc ');
}
$tpsql. = ")";
$orwhere. = $tpsql;
Unset ($tpsql);
}
else{
$orwhere. = "and". Typegetsunid ($typeid, $dsql, ' arc ');
}
Change to:
if ($ridnum >1) {
$tpsql = "";
for ($i =0; $i < $ridnum; $i + +) {
if ($tpsql = = "") {
Start to modify the article the second column calls the question
$ssid = Typegetsunid ($reids [$i], $dsql, ' arc ');
$ssid 2 = str_replace (' typeid ', ' Typeid2 ', $ssid);
$tpsql. = "and (". $ssid. "or". $ssid 2;}
else {
$tpsql. = "Or". Typegetsunid ($reids [$i], $dsql, ' arc ');
$tpsql. = Str_replace (' typeid ', ' Typeid2 ', $tpsql);}
}
$tpsql. = ")";
$orwhere. = $tpsql;
Unset ($tpsql);
}
else{
$ssid = Typegetsunid ($typeid, $dsql, ' arc ');
$ssid 2 = str_replace (' typeid ', ' Typeid2 ', $ssid);
$orwhere. = "and (". $ssid. "or". $ssid 2. ")"; /End Modification Article The second column calls the question
}
This section is used to solve the problem of invoking the Subordinate column article list
Replace the code I wrote is very rough, can be used for the time being, and so on the official solution come out and then replace
Another place to be changed in include/inc_arclist_view.php:
Get a single-column list of documents
Under
Criteria for category IDs
$orwhere. = "and (#@__archives.typeid= '). $this->typeid." ' or #@__archives.typeid2= ' ". $this->typeid." ') ";
Switch
Criteria for category IDs
$ssid = Typegetsunid ($this->typeid, $this->dsql);
$orwhere. = "and (#@__archives.typeid= '". $this->typeid. "" or ". $ssid." or #@__archives.typeid2= ". $this->typeid ."') ";
Otherwise there is no list content for the page because 80 rows are select COUNT (*) .....
There's a {Cmspath} on that column path.
First say {Cmspath} means, open the background "system configuration parameters" can see the second item, DEDECMS installation directory:
This is the path parsed by {Cmspath},
If the Beta2 upgrade to lit, you need to manually modify the column properties, the {Cmspath} removed. Or you can run all the files lit after Setup has been upgraded
Replace all previous B2 files so that {Cmspath} can parse correctly into your Web site path
If you don't use {Cmspath} This parameter, you can change it as follows
Execute sql:update dede_arctype set Typedir=replace (Typeidr, ' {cmspath} ', ');
To get rid of the database {Cmspath}
Then modify the file catalog_add.php find $true _typedir = Str_replace ("{Cmspath}", $cfg _cmspath, $typedir);
Change into
$true _typedir = Str_replace ("", $cfg _cmspath, $typedir);
Just do it.
[Field:description/] How does this label limit the number of words?
[Field:description function= ' Cn_substr (@me, 80) '/]
All tags in the Dede support the use of functions like this
About the 3.1 version of the link added after the first page does not show the problem
The main reason for this is that BLT at the time of writing dede_flink the value of the Ischeck of the table.
In 3.01 miles. Ischeck=1 represents the homepage link. 2 means the Inner page link, but 3.1 is the opposite,
The easiest way to change is to open inc_fun_spgetfriendlink.php.
Find line 13th.
CODE:
$wsql = "where ischeck=1";
[Copy to Clipboard]
Change 1 to 2 on the line.
After the 11.11 update, the call to inc_fun_spgetfriendlink.php this file was canceled.
So I just need to open inc_arcpart_view.php.
Near line 410
CODE:
$wsql = "where ischeck=1";
if ($type = = "P_w_picpath") $wsql. = "and logo<>" ";
else if ($type = = "text") $wsql. = "and logo=" ";
else $wsql. = "";
[Copy to Clipboard]
Also, change the where ischeck=1 to 2 to
Workaround for invalid version 3.1LIT ad name modification
http://bbs.dedecms.com/read.php?tid=7135
Look at the Huitie on the 4 floor.
Dede how to get rid of a list of article summaries
Delete [field:info/]
About the background login verification Code style modification
http://bbs.dedecms.com/read.php?tid=6244
When the length of English in the article description is greater than the width of table, it can be difficult to see
[Field:textlink/]
Switch
[Field:title function= ' Cn_substr (@me, 30) '/]
New channel Model Tutorial
http://bbs.dedecms.com/read.php?tid=5972
Dedecms Implementing a list page double style





{/dede:list}
[Field:typelink/] [Field:textlink/] click: [Field:click/] ([Field:stime/])

I want to implement a function, that is, in the article List (template list_article) if the article has thumbnails to display thumbnails, no, then directly display the list of articles instead of "no thumbnail" picture.
The extension of Dedecms is in function form, because adding if this structure is too resource-intensive, you can do this if you need to:
[Field:picname function= "getmypic (' @me ')"/]
Define a function in inc_functions.php
function Getmypic ($img)
{
if ($img = = "") return "";
else return "";
}
To deal with this.
This may be a little inconvenient, but the benefit is that it is both scalable and does not take up too much resources and does not affect the template structure to achieve true template and code separation
Click on the image to go to the next page
Open include/inc_archives_view.php
About 444 rows or so, find
$this->fields[$this->splitpagefield]= $this->fields[$this->splitpagefield];
Comment out, instead
$this->fields[$this->splitpagefield]= $this->clickpicnext ($this->fields[$this->splitpagefield]);
Then, finally add the function, notice in the last parenthesis!
Replace the picture with a link
//----------------------------
Function Clickpicnext (& $body)
{
if ($this->nowpage!= $this->totalpage) {
$lPage = $this->nowpage+1;
$body =preg_replace ("/< (img| IMG) (. *) (src| SRC) =[\ "|" | {0,} ((. *) >)/isu "," Namefirst. " _ ". $lPage.". $this->shortname. "' > "." \${0} "." ", $body);
$body = "Namefirst." _ ". $lPage.". $this->shortname. "' > ". $body." ";
}else{
if ($this->getnext ()) {
$body =preg_replace ("/< (img| IMG) (. *) (src| SRC) =[\ "|" | {0,} ((. *) >)/isu "," GetNext (). "' > "." \${0} "." ", $body);
$body = "GetNext ()." > ". $body." ";
}
}
return $body;
}
Automatically replace the picture in the article with a link to the next page, or, if it is the last page, the next article!
Note: First of all, according to the following changes, the next article on a separate line!
[dede3.1] [Change] on a separate call to the next article, and limit the article in the column rather than the current full station.
http://bbs.dedecms.com/read.php?tid=5051
In the article list, some of the title is truncated, with what kind of code can let the mouse on the top of the time can display the full file name?
{dede:arclist row=16 orderby=pubdate col=1 typeid=3}
  • · [Field:title function= "cn_substr (' @me ', 30)"/]

  • {/dede:arclist}
    How to display the article in front of the article name column?
    {dede:arclist row=10 orderby=pubdate}
    · [field:typelink/] [field:textlink/]

    {/dede:arclist}
    The generated article file name can increase MD5 encryption
    Change yourself, this is a typical boring demand it
    include/inc_channel_unit_functions.php
    .
    [Field:writer/] Why didn't it help?
    Lit version inc_arcpart_view.php no additional table read
    Modify include\inc\inc_fun_spgetarclist.php line 120th, add arc.writer at the back,
    Of course you can also join the additional table content you want to introduce such as:
    Arc.writer,arc.source,arc.shorttitle,
    New installation of DEDECMS3.0.1, the first time to login to say my password is wrong!
    You have to check if there is dede_admin this table, if there is, to see if there is data,
    If the user name and password do not have symbols that are not allowed,
    SQL import in which the server may not be able to complete the installation may prompt for a user name that does not exist
    Adding a user by hand is OK.
    You can also delete the table dede_admin in the database and reinstall it
    About Listpage pagination in the build will have a table of changes
    Search
    Get a static paging list
    In the next few lines you can see some of the pagination
    On the problem of multi-style and system bottom template
    With Arclist
    {Dede:arclist
    Typeid= ' row= ' col= ' titlelen= '
    infolen= ' imgwidth= ' imgheight= ' listtype= ' orderby= ' keyword= '}
    Custom style templates (InnerText)//define the styles you display here. Do not modify the underlying template. Lest you trouble yourself.
    {/dede:arclist}
    In addition, the template of the column can not use the system default {style}/list_article.htm
    You can manually specify the section's cover page template or list template. Columns such as: {style}/list_class1.htm
    {style}/list_class2.htm
    And so on. So you can have more style.
    The idea of using DEDECMS as a novel station
    1. New Two models
    Book model and chapter model
    2, re-write the file release procedures, the key to the two models associated with, and now provide content model Cmsware and Dede are not, and Dede self-built channel to provide the file release program can be very good use. Re-start these four files (two interfaces and two post-commit processes).
    3, if you want to make the starting point of the Chinese network which mode, it will be in the Member Directory to write about the program, as well as in plus write business models such as billing, counting points and other functions of the program.
    In fact, Dede is just a framework for content publishing, providing the backend tools only for administrators, users can fully customize various models, but to Dede familiar with a little.
    The ability to write a program may wish to try.
    Why is my custom tag always output as text?
    Add the ismake= ' Yes ' attribute to the tag.
    Some thoughts on the image SEO,

    Refer to the description of the arclist tag,
    Dede Editor Issues: Errors copied in from Word
    Copy post-security toolbar on the bottom right corner has a yellow t paste button ~ ~ ~ Move it up with hints, no formatting paste
    Where the definition of the label is placed
    What are the ***view.php of the files in the Include control view?
    Questions about Automatic paging
    The size of the automatic paging is only before 2-5
    3 is the meaning of 3K per page.
    This is not the same as moving, easy is the byte, so you can write 2000 or Dede is K so, you can only write 2 or 3, my mistake in, I wrote 2000k! Sweat one,
    What this means in Dede is that a paging is allowed to 2M! Naturally not successful
    About pagination headings
    The Content section can be formatted as follows:
    Pagination Title 1#e#
    1th page Content
    #p # pagination Title 2#e#
    2nd page Content
    #p # pagination Title 3#e#
    3rd page Content
    #p # pagination Title 4#e#
    4th page Content






    Additional options: Download remote pictures and resources how to close ah???
    Found in dede/article_add.php and article_edit.php (if other models find corresponding add and modify files)
    Additional options:

    Download remote pictures and resources
    Change value to 0 delete checked
    3.1b2///channelartlist and Arclist Bug temporary Solutions
    Fix all column lists are the same and channelartlist arclist tags cannot be customized
    Open include/inc_arcpart_view.php
    Found in line 207
    else $typeid = 0;
    and cut him off.
    ---------------------
    Open include/inc/inc_fun_spgetchannellist.php again.
    Found on line 66th
    $ctag->getatt (' innertext ')
    Switch
    $ctag->getinnertext ()
    Can.
    If you have a problem, you can add a group: 18176791
    Oh, you can see here. Show you are sincere to do the station! I wish you success!!

    The above describes the power by Dedecms Dedecms common problems in the revision method summary, including the power by DEDECMS aspects, I hope to be interested in PHP tutorial friends helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.