链接中的Wordpress PrettyPhoto Gallery

时间:2018-11-27 18:48:37

标签: wordpress hyperlink image-gallery

我想拥有一个打开prettyphoto画廊的链接。我正在将Wordpress和Visual Bakery插件一起用作编辑器。

我发现我是否这样做...

<a class="prettyphoto" href="https://paradisocommunities.com/wp-content/uploads/2018/11/Heirloom-LegacyPointe32.jpg" data-rel="prettyPhoto[rel-17-696085417]">Link Text or Image</a>

...它将显示使用prettyphoto弹出窗口,但没有图库。如果您单击此页面上的“激发”按钮,则可以看到此工作:https://paradisocommunities.com/model/the-heirloom/

有人知道如何将此链接设为图库吗?

Visual Composer中图像网格库的简码为:

[vc_gallery type="image_grid" images="1017,1016,1015,1014,1013,1012,1011,1010" img_size="full"]

是否可以使用这些数字将其设置为图库或仅作为文件名?

1 个答案:

答案 0 :(得分:0)

您应该可以通过向链接添加更多属性来实现。

package com.example.user.shopkeeper.sql;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.provider.BaseColumns;

import com.example.user.shopkeeper.model.User;

public class AddClientUser extends SQLiteOpenHelper implements BaseColumns{


    private static final int DATABASE_VERSION = 1;
    private static final String DATABASE_NAME = "manager.db";

    private final static String TABLE_CLIENT = "clients";
    private final static String _ID = BaseColumns._ID;
    private final static String COLUMN_USER_ID = "user_id";
    private final static String CLIENT_USER_ID = "client_user_id";
    private final static String COLUMN_CLIENT_NAME = "name";
    private final static String COLUMN_CLIENT_GENDER = "gender";
    private final static String COLUMN_CLIENT_MOBILE_NUMBER = "mobile_number";
    private final static String COLUMN_AMOUNT = "amount";
    public final static int GENDER_UNKNOWN = 0;
    public final static int GENDER_MALE = 1;
    public final static int GENDER_FEMALE = 2;

    private String CREATE_USER_TABLE = "CREATE TABLE " + TABLE_CLIENT + "( "
            + CLIENT_USER_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + COLUMN_USER_ID + " INTEGER, "
            + COLUMN_CLIENT_NAME + " TEXT, " + COLUMN_CLIENT_MOBILE_NUMBER + " TEXT, " + COLUMN_CLIENT_GENDER + " TEXT, "
            + COLUMN_AMOUNT + " INTEGER" + " )";



    private String DROP_USER_TABLE = "DROP TABLE IF EXISTS " + TABLE_CLIENT;

    public AddClientUser(Context context){
        super(context,DATABASE_NAME,null,DATABASE_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db){
        db.execSQL(CREATE_USER_TABLE);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion){
        db.execSQL(DROP_USER_TABLE);
        onCreate(db);
    }

    public boolean checkUserMobile(String contact){
        String[] columns = {
                CLIENT_USER_ID
        };

        SQLiteDatabase db = this.getReadableDatabase();
        String selection = COLUMN_CLIENT_MOBILE_NUMBER  + " =? ";
        String[] selectionArgs = {contact};
        Cursor cursor = db.query(TABLE_CLIENT,
                columns,
                selection,
                selectionArgs,
                null,
                null,
                null );

        int count = cursor.getCount();
        cursor.close();
        db.close();

        if(count > 0){
            return true;
        } else{
            return false;
        }
    }

    public void addClient(User user){
        SQLiteDatabase db = this.getWritableDatabase();
        ContentValues values = new ContentValues();
        values.put(COLUMN_USER_ID,user.getUserId());
        values.put(COLUMN_CLIENT_NAME,user.getName());
        values.put(COLUMN_CLIENT_MOBILE_NUMBER,user.getNumber());
        values.put(COLUMN_CLIENT_GENDER,user.getGender());
        values.put(COLUMN_AMOUNT,user.getAmount());

        db.insert(TABLE_CLIENT,null,values);
        db.close();
    }

}

这是从他们的官方支持论坛上进行的讨论:

https://wordpress.org/support/topic/go-to-prev-and-next-photo-in-lightbox-view/#post-4528237